mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
22 lines
529 B
Go
22 lines
529 B
Go
package interfaces
|
|
|
|
type ServiceCrudOptions struct {
|
|
IsAbsolute bool // whether the path is absolute
|
|
OnlyFromWorkspace bool // whether only sync from workspace
|
|
NotSyncToWorkspace bool // whether not sync to workspace
|
|
}
|
|
|
|
type ServiceCrudOption func(o *ServiceCrudOptions)
|
|
|
|
func WithOnlyFromWorkspace() ServiceCrudOption {
|
|
return func(o *ServiceCrudOptions) {
|
|
o.OnlyFromWorkspace = true
|
|
}
|
|
}
|
|
|
|
func WithNotSyncToWorkspace() ServiceCrudOption {
|
|
return func(o *ServiceCrudOptions) {
|
|
o.NotSyncToWorkspace = true
|
|
}
|
|
}
|