Files
crawlab/core/interfaces/fs_service_options.go
2024-06-14 15:42:50 +08:00

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
}
}