Documentation ¶
Index ¶
- func GetBaseService(id interfaces.ModelId) (svc interfaces.ModelBaseService)
- func GetBaseServiceByColName(id interfaces.ModelId, colName string) (svc interfaces.ModelBaseService)
- func NewBaseService(id interfaces.ModelId, opts ...BaseServiceOption) (svc2 interfaces.ModelBaseService)
- func NewBasicBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelBinder)
- func NewListBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelListBinder)
- type BaseService
- func (svc *BaseService) Count(query bson.M) (total int, err error)
- func (svc *BaseService) Delete(query bson.M, args ...interface{}) (err error)
- func (svc *BaseService) DeleteById(id primitive.ObjectID, args ...interface{}) (err error)
- func (svc *BaseService) DeleteList(query bson.M, args ...interface{}) (err error)
- func (svc *BaseService) ForceDeleteList(query bson.M, args ...interface{}) (err error)
- func (svc *BaseService) Get(query bson.M, opts *mongo.FindOptions) (res interfaces.Model, err error)
- func (svc *BaseService) GetById(id primitive.ObjectID) (res interfaces.Model, err error)
- func (svc *BaseService) GetCol() (col *mongo.Col)
- func (svc *BaseService) GetList(query bson.M, opts *mongo.FindOptions) (l interfaces.List, err error)
- func (svc *BaseService) GetModelId() (id interfaces.ModelId)
- func (svc *BaseService) Insert(u interfaces.User, docs ...interface{}) (err error)
- func (svc *BaseService) SetCol(col *mongo.Col)
- func (svc *BaseService) SetModelId(id interfaces.ModelId)
- func (svc *BaseService) Update(query bson.M, update bson.M, fields []string, args ...interface{}) (err error)
- func (svc *BaseService) UpdateById(id primitive.ObjectID, update bson.M, args ...interface{}) (err error)
- func (svc *BaseService) UpdateDoc(query bson.M, doc interfaces.Model, fields []string, args ...interface{}) (err error)
- type BaseServiceOption
- type BasicBinder
- type ListBinder
- type ModelService
- type Option
- type Service
- func (svc *Service) DropAll() (err error)
- func (svc *Service) GetArtifact(query bson.M, opts *mongo.FindOptions) (res *models2.Artifact, err error)
- func (svc *Service) GetArtifactById(id primitive.ObjectID) (res *models2.Artifact, err error)
- func (svc *Service) GetArtifactList(query bson.M, opts *mongo.FindOptions) (res []models2.Artifact, err error)
- func (svc *Service) GetBaseService(id interfaces.ModelId) (svc2 interfaces.ModelBaseService)
- func (svc *Service) GetDataCollection(query bson.M, opts *mongo.FindOptions) (res *models2.DataCollection, err error)
- func (svc *Service) GetDataCollectionById(id primitive.ObjectID) (res *models2.DataCollection, err error)
- func (svc *Service) GetDataCollectionByName(name string, opts *mongo.FindOptions) (res *models2.DataCollection, err error)
- func (svc *Service) GetDataCollectionList(query bson.M, opts *mongo.FindOptions) (res []models2.DataCollection, err error)
- func (svc *Service) GetDataSource(query bson.M, opts *mongo.FindOptions) (res *models2.DataSource, err error)
- func (svc *Service) GetDataSourceById(id primitive.ObjectID) (res *models2.DataSource, err error)
- func (svc *Service) GetDataSourceList(query bson.M, opts *mongo.FindOptions) (res []models2.DataSource, err error)
- func (svc *Service) GetEnvironment(query bson.M, opts *mongo.FindOptions) (res *models2.Environment, err error)
- func (svc *Service) GetEnvironmentById(id primitive.ObjectID) (res *models2.Environment, err error)
- func (svc *Service) GetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []models2.Environment, err error)
- func (svc *Service) GetExtraValue(query bson.M, opts *mongo.FindOptions) (res *models.ExtraValue, err error)
- func (svc *Service) GetExtraValueById(id primitive.ObjectID) (res *models.ExtraValue, err error)
- func (svc *Service) GetExtraValueByObjectIdModel(oid primitive.ObjectID, m string, opts *mongo.FindOptions) (res *models.ExtraValue, err error)
- func (svc *Service) GetExtraValueList(query bson.M, opts *mongo.FindOptions) (res []models.ExtraValue, err error)
- func (svc *Service) GetGit(query bson.M, opts *mongo.FindOptions) (res *models2.Git, err error)
- func (svc *Service) GetGitById(id primitive.ObjectID) (res *models2.Git, err error)
- func (svc *Service) GetGitList(query bson.M, opts *mongo.FindOptions) (res []models2.Git, err error)
- func (svc *Service) GetJob(query bson.M, opts *mongo.FindOptions) (res *models2.Job, err error)
- func (svc *Service) GetJobById(id primitive.ObjectID) (res *models2.Job, err error)
- func (svc *Service) GetJobList(query bson.M, opts *mongo.FindOptions) (res []models2.Job, err error)
- func (svc *Service) GetNode(query bson.M, opts *mongo.FindOptions) (res *models2.Node, err error)
- func (svc *Service) GetNodeById(id primitive.ObjectID) (res *models2.Node, err error)
- func (svc *Service) GetNodeByKey(key string, opts *mongo.FindOptions) (res *models2.Node, err error)
- func (svc *Service) GetNodeList(query bson.M, opts *mongo.FindOptions) (res []models2.Node, err error)
- func (svc *Service) GetPassword(query bson.M, opts *mongo.FindOptions) (res *models2.Password, err error)
- func (svc *Service) GetPasswordById(id primitive.ObjectID) (res *models2.Password, err error)
- func (svc *Service) GetPasswordList(query bson.M, opts *mongo.FindOptions) (res []models2.Password, err error)
- func (svc *Service) GetPermission(query bson.M, opts *mongo.FindOptions) (res *models2.Permission, err error)
- func (svc *Service) GetPermissionById(id primitive.ObjectID) (res *models2.Permission, err error)
- func (svc *Service) GetPermissionByKey(key string, opts *mongo.FindOptions) (res *models2.Permission, err error)
- func (svc *Service) GetPermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.Permission, err error)
- func (svc *Service) GetPlugin(query bson.M, opts *mongo.FindOptions) (res *models2.Plugin, err error)
- func (svc *Service) GetPluginById(id primitive.ObjectID) (res *models2.Plugin, err error)
- func (svc *Service) GetPluginByName(name string) (res *models2.Plugin, err error)
- func (svc *Service) GetPluginList(query bson.M, opts *mongo.FindOptions) (res []models2.Plugin, err error)
- func (svc *Service) GetPluginStatus(query bson.M, opts *mongo.FindOptions) (res *models2.PluginStatus, err error)
- func (svc *Service) GetPluginStatusById(id primitive.ObjectID) (res *models2.PluginStatus, err error)
- func (svc *Service) GetPluginStatusList(query bson.M, opts *mongo.FindOptions) (res []models2.PluginStatus, err error)
- func (svc *Service) GetProject(query bson.M, opts *mongo.FindOptions) (res *models2.Project, err error)
- func (svc *Service) GetProjectById(id primitive.ObjectID) (res *models2.Project, err error)
- func (svc *Service) GetProjectList(query bson.M, opts *mongo.FindOptions) (res []models2.Project, err error)
- func (svc *Service) GetRole(query bson.M, opts *mongo.FindOptions) (res *models2.Role, err error)
- func (svc *Service) GetRoleById(id primitive.ObjectID) (res *models2.Role, err error)
- func (svc *Service) GetRoleByKey(key string, opts *mongo.FindOptions) (res *models2.Role, err error)
- func (svc *Service) GetRoleByName(name string, opts *mongo.FindOptions) (res *models2.Role, err error)
- func (svc *Service) GetRoleList(query bson.M, opts *mongo.FindOptions) (res []models2.Role, err error)
- func (svc *Service) GetRolePermission(query bson.M, opts *mongo.FindOptions) (res *models2.RolePermission, err error)
- func (svc *Service) GetRolePermissionById(id primitive.ObjectID) (res *models2.RolePermission, err error)
- func (svc *Service) GetRolePermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
- func (svc *Service) GetRolePermissionListByPermissionId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
- func (svc *Service) GetRolePermissionListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
- func (svc *Service) GetSchedule(query bson.M, opts *mongo.FindOptions) (res *models2.Schedule, err error)
- func (svc *Service) GetScheduleById(id primitive.ObjectID) (res *models2.Schedule, err error)
- func (svc *Service) GetScheduleList(query bson.M, opts *mongo.FindOptions) (res []models2.Schedule, err error)
- func (svc *Service) GetSetting(query bson.M, opts *mongo.FindOptions) (res *models2.Setting, err error)
- func (svc *Service) GetSettingById(id primitive.ObjectID) (res *models2.Setting, err error)
- func (svc *Service) GetSettingByKey(key string, opts *mongo.FindOptions) (res *models2.Setting, err error)
- func (svc *Service) GetSettingList(query bson.M, opts *mongo.FindOptions) (res []models2.Setting, err error)
- func (svc *Service) GetSpider(query bson.M, opts *mongo.FindOptions) (res *models2.Spider, err error)
- func (svc *Service) GetSpiderById(id primitive.ObjectID) (res *models2.Spider, err error)
- func (svc *Service) GetSpiderList(query bson.M, opts *mongo.FindOptions) (res []models2.Spider, err error)
- func (svc *Service) GetSpiderStat(query bson.M, opts *mongo.FindOptions) (res *models2.SpiderStat, err error)
- func (svc *Service) GetSpiderStatById(id primitive.ObjectID) (res *models2.SpiderStat, err error)
- func (svc *Service) GetSpiderStatList(query bson.M, opts *mongo.FindOptions) (res []models2.SpiderStat, err error)
- func (svc *Service) GetTag(query bson.M, opts *mongo.FindOptions) (res *models2.Tag, err error)
- func (svc *Service) GetTagById(id primitive.ObjectID) (res *models2.Tag, err error)
- func (svc *Service) GetTagIds(colName string, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)
- func (svc *Service) GetTagList(query bson.M, opts *mongo.FindOptions) (res []models2.Tag, err error)
- func (svc *Service) GetTask(query bson.M, opts *mongo.FindOptions) (res *models2.Task, err error)
- func (svc *Service) GetTaskById(id primitive.ObjectID) (res *models2.Task, err error)
- func (svc *Service) GetTaskList(query bson.M, opts *mongo.FindOptions) (res []models2.Task, err error)
- func (svc *Service) GetTaskQueueItem(query bson.M, opts *mongo.FindOptions) (res *models2.TaskQueueItem, err error)
- func (svc *Service) GetTaskQueueItemById(id primitive.ObjectID) (res *models2.TaskQueueItem, err error)
- func (svc *Service) GetTaskQueueItemList(query bson.M, opts *mongo.FindOptions) (res []models2.TaskQueueItem, err error)
- func (svc *Service) GetTaskStat(query bson.M, opts *mongo.FindOptions) (res *models2.TaskStat, err error)
- func (svc *Service) GetTaskStatById(id primitive.ObjectID) (res *models2.TaskStat, err error)
- func (svc *Service) GetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []models2.TaskStat, err error)
- func (svc *Service) GetToken(query bson.M, opts *mongo.FindOptions) (res *models2.Token, err error)
- func (svc *Service) GetTokenById(id primitive.ObjectID) (res *models2.Token, err error)
- func (svc *Service) GetTokenList(query bson.M, opts *mongo.FindOptions) (res []models2.Token, err error)
- func (svc *Service) GetUser(query bson.M, opts *mongo.FindOptions) (res *models2.User, err error)
- func (svc *Service) GetUserById(id primitive.ObjectID) (res *models2.User, err error)
- func (svc *Service) GetUserByUsername(username string, opts *mongo.FindOptions) (res *models2.User, err error)
- func (svc *Service) GetUserByUsernameWithPassword(username string, opts *mongo.FindOptions) (res *models2.User, err error)
- func (svc *Service) GetUserList(query bson.M, opts *mongo.FindOptions) (res []models2.User, err error)
- func (svc *Service) GetUserRole(query bson.M, opts *mongo.FindOptions) (res *models2.UserRole, err error)
- func (svc *Service) GetUserRoleById(id primitive.ObjectID) (res *models2.UserRole, err error)
- func (svc *Service) GetUserRoleList(query bson.M, opts *mongo.FindOptions) (res []models2.UserRole, err error)
- func (svc *Service) GetUserRoleListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.UserRole, err error)
- func (svc *Service) GetUserRoleListByUserId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.UserRole, err error)
- func (svc *Service) GetVariable(query bson.M, opts *mongo.FindOptions) (res *models2.Variable, err error)
- func (svc *Service) GetVariableById(id primitive.ObjectID) (res *models2.Variable, err error)
- func (svc *Service) GetVariableByKey(key string, opts *mongo.FindOptions) (res *models2.Variable, err error)
- func (svc *Service) GetVariableList(query bson.M, opts *mongo.FindOptions) (res []models2.Variable, err error)
- func (svc *Service) UpdateTags(colName string, query bson.M, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)
- func (svc *Service) UpdateTagsById(colName string, id primitive.ObjectID, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseService ¶
func GetBaseService(id interfaces.ModelId) (svc interfaces.ModelBaseService)
func GetBaseServiceByColName ¶
func GetBaseServiceByColName(id interfaces.ModelId, colName string) (svc interfaces.ModelBaseService)
func NewBaseService ¶
func NewBaseService(id interfaces.ModelId, opts ...BaseServiceOption) (svc2 interfaces.ModelBaseService)
func NewBasicBinder ¶
func NewBasicBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelBinder)
func NewListBinder ¶
func NewListBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelListBinder)
Types ¶
type BaseService ¶
type BaseService struct {
// contains filtered or unexported fields
}
func (*BaseService) Delete ¶
func (svc *BaseService) Delete(query bson.M, args ...interface{}) (err error)
func (*BaseService) DeleteById ¶
func (svc *BaseService) DeleteById(id primitive.ObjectID, args ...interface{}) (err error)
func (*BaseService) DeleteList ¶
func (svc *BaseService) DeleteList(query bson.M, args ...interface{}) (err error)
func (*BaseService) ForceDeleteList ¶
func (svc *BaseService) ForceDeleteList(query bson.M, args ...interface{}) (err error)
func (*BaseService) Get ¶
func (svc *BaseService) Get(query bson.M, opts *mongo.FindOptions) (res interfaces.Model, err error)
func (*BaseService) GetById ¶
func (svc *BaseService) GetById(id primitive.ObjectID) (res interfaces.Model, err error)
func (*BaseService) GetCol ¶
func (svc *BaseService) GetCol() (col *mongo.Col)
func (*BaseService) GetList ¶
func (svc *BaseService) GetList(query bson.M, opts *mongo.FindOptions) (l interfaces.List, err error)
func (*BaseService) GetModelId ¶
func (svc *BaseService) GetModelId() (id interfaces.ModelId)
func (*BaseService) Insert ¶
func (svc *BaseService) Insert(u interfaces.User, docs ...interface{}) (err error)
func (*BaseService) SetCol ¶
func (svc *BaseService) SetCol(col *mongo.Col)
func (*BaseService) SetModelId ¶
func (svc *BaseService) SetModelId(id interfaces.ModelId)
func (*BaseService) UpdateById ¶
func (*BaseService) UpdateDoc ¶
func (svc *BaseService) UpdateDoc(query bson.M, doc interfaces.Model, fields []string, args ...interface{}) (err error)
type BaseServiceOption ¶
type BaseServiceOption func(svc interfaces.ModelBaseService)
func WithBaseServiceCol ¶
func WithBaseServiceCol(col *mongo.Col) BaseServiceOption
func WithBaseServiceModelId ¶
func WithBaseServiceModelId(id interfaces.ModelId) BaseServiceOption
type BasicBinder ¶
type BasicBinder struct {
// contains filtered or unexported fields
}
func (*BasicBinder) Bind ¶
func (b *BasicBinder) Bind() (res interfaces.Model, err error)
func (*BasicBinder) Process ¶
func (b *BasicBinder) Process(d interfaces.Model) (res interfaces.Model, err error)
type ListBinder ¶
type ListBinder struct {
// contains filtered or unexported fields
}
func (*ListBinder) Bind ¶
func (b *ListBinder) Bind() (l interfaces.List, err error)
func (*ListBinder) Process ¶
func (b *ListBinder) Process(d interface{}) (l interfaces.List, err error)
type ModelService ¶
type ModelService interface { interfaces.ModelService DropAll() (err error) GetNodeById(id primitive.ObjectID) (res *models.Node, err error) GetNode(query bson.M, opts *mongo.FindOptions) (res *models.Node, err error) GetNodeList(query bson.M, opts *mongo.FindOptions) (res []models.Node, err error) GetNodeByKey(key string, opts *mongo.FindOptions) (res *models.Node, err error) GetProjectById(id primitive.ObjectID) (res *models.Project, err error) GetProject(query bson.M, opts *mongo.FindOptions) (res *models.Project, err error) GetProjectList(query bson.M, opts *mongo.FindOptions) (res []models.Project, err error) GetArtifactById(id primitive.ObjectID) (res *models.Artifact, err error) GetArtifact(query bson.M, opts *mongo.FindOptions) (res *models.Artifact, err error) GetArtifactList(query bson.M, opts *mongo.FindOptions) (res []models.Artifact, err error) GetTagById(id primitive.ObjectID) (res *models.Tag, err error) GetTag(query bson.M, opts *mongo.FindOptions) (res *models.Tag, err error) GetTagList(query bson.M, opts *mongo.FindOptions) (res []models.Tag, err error) GetTagIds(colName string, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) UpdateTagsById(colName string, id primitive.ObjectID, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) UpdateTags(colName string, query bson.M, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) GetJobById(id primitive.ObjectID) (res *models.Job, err error) GetJob(query bson.M, opts *mongo.FindOptions) (res *models.Job, err error) GetJobList(query bson.M, opts *mongo.FindOptions) (res []models.Job, err error) GetScheduleById(id primitive.ObjectID) (res *models.Schedule, err error) GetSchedule(query bson.M, opts *mongo.FindOptions) (res *models.Schedule, err error) GetScheduleList(query bson.M, opts *mongo.FindOptions) (res []models.Schedule, err error) GetUserById(id primitive.ObjectID) (res *models.User, err error) GetUser(query bson.M, opts *mongo.FindOptions) (res *models.User, err error) GetUserList(query bson.M, opts *mongo.FindOptions) (res []models.User, err error) GetUserByUsername(username string, opts *mongo.FindOptions) (res *models.User, err error) GetUserByUsernameWithPassword(username string, opts *mongo.FindOptions) (res *models.User, err error) GetSettingById(id primitive.ObjectID) (res *models.Setting, err error) GetSetting(query bson.M, opts *mongo.FindOptions) (res *models.Setting, err error) GetSettingList(query bson.M, opts *mongo.FindOptions) (res []models.Setting, err error) GetSettingByKey(key string, opts *mongo.FindOptions) (res *models.Setting, err error) GetSpiderById(id primitive.ObjectID) (res *models.Spider, err error) GetSpider(query bson.M, opts *mongo.FindOptions) (res *models.Spider, err error) GetSpiderList(query bson.M, opts *mongo.FindOptions) (res []models.Spider, err error) GetTaskById(id primitive.ObjectID) (res *models.Task, err error) GetTask(query bson.M, opts *mongo.FindOptions) (res *models.Task, err error) GetTaskList(query bson.M, opts *mongo.FindOptions) (res []models.Task, err error) GetTokenById(id primitive.ObjectID) (res *models.Token, err error) GetToken(query bson.M, opts *mongo.FindOptions) (res *models.Token, err error) GetTokenList(query bson.M, opts *mongo.FindOptions) (res []models.Token, err error) GetVariableById(id primitive.ObjectID) (res *models.Variable, err error) GetVariable(query bson.M, opts *mongo.FindOptions) (res *models.Variable, err error) GetVariableList(query bson.M, opts *mongo.FindOptions) (res []models.Variable, err error) GetVariableByKey(key string, opts *mongo.FindOptions) (res *models.Variable, err error) GetTaskQueueItemById(id primitive.ObjectID) (res *models.TaskQueueItem, err error) GetTaskQueueItem(query bson.M, opts *mongo.FindOptions) (res *models.TaskQueueItem, err error) GetTaskQueueItemList(query bson.M, opts *mongo.FindOptions) (res []models.TaskQueueItem, err error) GetTaskStatById(id primitive.ObjectID) (res *models.TaskStat, err error) GetTaskStat(query bson.M, opts *mongo.FindOptions) (res *models.TaskStat, err error) GetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []models.TaskStat, err error) GetPluginById(id primitive.ObjectID) (res *models.Plugin, err error) GetPlugin(query bson.M, opts *mongo.FindOptions) (res *models.Plugin, err error) GetPluginByName(name string) (res *models.Plugin, err error) GetPluginList(query bson.M, opts *mongo.FindOptions) (res []models.Plugin, err error) GetSpiderStatById(id primitive.ObjectID) (res *models.SpiderStat, err error) GetSpiderStat(query bson.M, opts *mongo.FindOptions) (res *models.SpiderStat, err error) GetSpiderStatList(query bson.M, opts *mongo.FindOptions) (res []models.SpiderStat, err error) GetDataSourceById(id primitive.ObjectID) (res *models.DataSource, err error) GetDataSource(query bson.M, opts *mongo.FindOptions) (res *models.DataSource, err error) GetDataSourceList(query bson.M, opts *mongo.FindOptions) (res []models.DataSource, err error) GetDataCollectionById(id primitive.ObjectID) (res *models.DataCollection, err error) GetDataCollection(query bson.M, opts *mongo.FindOptions) (res *models.DataCollection, err error) GetDataCollectionList(query bson.M, opts *mongo.FindOptions) (res []models.DataCollection, err error) GetDataCollectionByName(name string, opts *mongo.FindOptions) (res *models.DataCollection, err error) GetPasswordById(id primitive.ObjectID) (res *models.Password, err error) GetPassword(query bson.M, opts *mongo.FindOptions) (res *models.Password, err error) GetPasswordList(query bson.M, opts *mongo.FindOptions) (res []models.Password, err error) GetExtraValueById(id primitive.ObjectID) (res *models.ExtraValue, err error) GetExtraValue(query bson.M, opts *mongo.FindOptions) (res *models.ExtraValue, err error) GetExtraValueList(query bson.M, opts *mongo.FindOptions) (res []models.ExtraValue, err error) GetExtraValueByObjectIdModel(oid primitive.ObjectID, m string, opts *mongo.FindOptions) (res *models.ExtraValue, err error) GetPluginStatusById(id primitive.ObjectID) (res *models.PluginStatus, err error) GetPluginStatus(query bson.M, opts *mongo.FindOptions) (res *models.PluginStatus, err error) GetPluginStatusList(query bson.M, opts *mongo.FindOptions) (res []models.PluginStatus, err error) GetGitById(id primitive.ObjectID) (res *models.Git, err error) GetGit(query bson.M, opts *mongo.FindOptions) (res *models.Git, err error) GetGitList(query bson.M, opts *mongo.FindOptions) (res []models.Git, err error) GetRoleById(id primitive.ObjectID) (res *models.Role, err error) GetRole(query bson.M, opts *mongo.FindOptions) (res *models.Role, err error) GetRoleList(query bson.M, opts *mongo.FindOptions) (res []models.Role, err error) GetRoleByName(name string, opts *mongo.FindOptions) (res *models.Role, err error) GetRoleByKey(key string, opts *mongo.FindOptions) (res *models.Role, err error) GetUserRoleById(id primitive.ObjectID) (res *models.UserRole, err error) GetUserRole(query bson.M, opts *mongo.FindOptions) (res *models.UserRole, err error) GetUserRoleList(query bson.M, opts *mongo.FindOptions) (res []models.UserRole, err error) GetUserRoleListByUserId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.UserRole, err error) GetUserRoleListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.UserRole, err error) GetPermissionById(id primitive.ObjectID) (res *models.Permission, err error) GetPermission(query bson.M, opts *mongo.FindOptions) (res *models.Permission, err error) GetPermissionList(query bson.M, opts *mongo.FindOptions) (res []models.Permission, err error) GetPermissionByKey(key string, opts *mongo.FindOptions) (res *models.Permission, err error) GetRolePermission(query bson.M, opts *mongo.FindOptions) (res *models.RolePermission, err error) GetRolePermissionList(query bson.M, opts *mongo.FindOptions) (res []models.RolePermission, err error) GetRolePermissionListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.RolePermission, err error) GetRolePermissionListByPermissionId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.RolePermission, err error) GetEnvironmentById(id primitive.ObjectID) (res *models.Environment, err error) GetEnvironment(query bson.M, opts *mongo.FindOptions) (res *models.Environment, err error) GetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []models.Environment, err error) }
func GetService ¶
func GetService(opts ...Option) (svc ModelService, err error)
func NewService ¶
func NewService(opts ...Option) (svc2 ModelService, err error)
type Option ¶
type Option func(ModelService)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GetArtifact ¶
func (*Service) GetArtifactById ¶
func (*Service) GetArtifactList ¶
func (*Service) GetBaseService ¶
func (svc *Service) GetBaseService(id interfaces.ModelId) (svc2 interfaces.ModelBaseService)
func (*Service) GetDataCollection ¶
func (svc *Service) GetDataCollection(query bson.M, opts *mongo.FindOptions) (res *models2.DataCollection, err error)
func (*Service) GetDataCollectionById ¶
func (*Service) GetDataCollectionByName ¶
func (svc *Service) GetDataCollectionByName(name string, opts *mongo.FindOptions) (res *models2.DataCollection, err error)
func (*Service) GetDataCollectionList ¶
func (svc *Service) GetDataCollectionList(query bson.M, opts *mongo.FindOptions) (res []models2.DataCollection, err error)
func (*Service) GetDataSource ¶
func (svc *Service) GetDataSource(query bson.M, opts *mongo.FindOptions) (res *models2.DataSource, err error)
func (*Service) GetDataSourceById ¶
func (*Service) GetDataSourceList ¶
func (svc *Service) GetDataSourceList(query bson.M, opts *mongo.FindOptions) (res []models2.DataSource, err error)
func (*Service) GetEnvironment ¶ added in v0.6.2
func (svc *Service) GetEnvironment(query bson.M, opts *mongo.FindOptions) (res *models2.Environment, err error)
func (*Service) GetEnvironmentById ¶ added in v0.6.2
func (*Service) GetEnvironmentList ¶ added in v0.6.2
func (svc *Service) GetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []models2.Environment, err error)
func (*Service) GetExtraValue ¶
func (svc *Service) GetExtraValue(query bson.M, opts *mongo.FindOptions) (res *models.ExtraValue, err error)
func (*Service) GetExtraValueById ¶
func (*Service) GetExtraValueByObjectIdModel ¶
func (svc *Service) GetExtraValueByObjectIdModel(oid primitive.ObjectID, m string, opts *mongo.FindOptions) (res *models.ExtraValue, err error)
func (*Service) GetExtraValueList ¶
func (svc *Service) GetExtraValueList(query bson.M, opts *mongo.FindOptions) (res []models.ExtraValue, err error)
func (*Service) GetGitById ¶
func (*Service) GetGitList ¶
func (*Service) GetJobById ¶
func (*Service) GetJobList ¶
func (*Service) GetNodeById ¶
func (*Service) GetNodeByKey ¶
func (*Service) GetNodeList ¶
func (*Service) GetPassword ¶
func (*Service) GetPasswordById ¶
func (*Service) GetPasswordList ¶
func (*Service) GetPermission ¶ added in v0.6.1
func (svc *Service) GetPermission(query bson.M, opts *mongo.FindOptions) (res *models2.Permission, err error)
func (*Service) GetPermissionById ¶ added in v0.6.1
func (*Service) GetPermissionByKey ¶ added in v0.6.1
func (svc *Service) GetPermissionByKey(key string, opts *mongo.FindOptions) (res *models2.Permission, err error)
func (*Service) GetPermissionList ¶ added in v0.6.1
func (svc *Service) GetPermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.Permission, err error)
func (*Service) GetPluginById ¶
func (*Service) GetPluginByName ¶
func (*Service) GetPluginList ¶
func (*Service) GetPluginStatus ¶
func (svc *Service) GetPluginStatus(query bson.M, opts *mongo.FindOptions) (res *models2.PluginStatus, err error)
func (*Service) GetPluginStatusById ¶
func (*Service) GetPluginStatusList ¶
func (svc *Service) GetPluginStatusList(query bson.M, opts *mongo.FindOptions) (res []models2.PluginStatus, err error)
func (*Service) GetProject ¶
func (*Service) GetProjectById ¶
func (*Service) GetProjectList ¶
func (*Service) GetRoleById ¶ added in v0.6.1
func (*Service) GetRoleByKey ¶ added in v0.6.1
func (*Service) GetRoleByName ¶ added in v0.6.1
func (*Service) GetRoleList ¶ added in v0.6.1
func (*Service) GetRolePermission ¶ added in v0.6.1
func (svc *Service) GetRolePermission(query bson.M, opts *mongo.FindOptions) (res *models2.RolePermission, err error)
func (*Service) GetRolePermissionById ¶ added in v0.6.1
func (*Service) GetRolePermissionList ¶ added in v0.6.1
func (svc *Service) GetRolePermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
func (*Service) GetRolePermissionListByPermissionId ¶ added in v0.6.1
func (svc *Service) GetRolePermissionListByPermissionId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
func (*Service) GetRolePermissionListByRoleId ¶ added in v0.6.1
func (svc *Service) GetRolePermissionListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error)
func (*Service) GetSchedule ¶
func (*Service) GetScheduleById ¶
func (*Service) GetScheduleList ¶
func (*Service) GetSetting ¶
func (*Service) GetSettingById ¶
func (*Service) GetSettingByKey ¶
func (*Service) GetSettingList ¶
func (*Service) GetSpiderById ¶
func (*Service) GetSpiderList ¶
func (*Service) GetSpiderStat ¶
func (svc *Service) GetSpiderStat(query bson.M, opts *mongo.FindOptions) (res *models2.SpiderStat, err error)
func (*Service) GetSpiderStatById ¶
func (*Service) GetSpiderStatList ¶
func (svc *Service) GetSpiderStatList(query bson.M, opts *mongo.FindOptions) (res []models2.SpiderStat, err error)
func (*Service) GetTagById ¶
func (*Service) GetTagList ¶
func (*Service) GetTaskById ¶
func (*Service) GetTaskList ¶
func (*Service) GetTaskQueueItem ¶
func (svc *Service) GetTaskQueueItem(query bson.M, opts *mongo.FindOptions) (res *models2.TaskQueueItem, err error)
func (*Service) GetTaskQueueItemById ¶
func (*Service) GetTaskQueueItemList ¶
func (svc *Service) GetTaskQueueItemList(query bson.M, opts *mongo.FindOptions) (res []models2.TaskQueueItem, err error)
func (*Service) GetTaskStat ¶
func (*Service) GetTaskStatById ¶
func (*Service) GetTaskStatList ¶
func (*Service) GetTokenById ¶
func (*Service) GetTokenList ¶
func (*Service) GetUserById ¶
func (*Service) GetUserByUsername ¶
func (*Service) GetUserByUsernameWithPassword ¶
func (*Service) GetUserList ¶
func (*Service) GetUserRole ¶ added in v0.6.1
func (*Service) GetUserRoleById ¶ added in v0.6.1
func (*Service) GetUserRoleList ¶ added in v0.6.1
func (*Service) GetUserRoleListByRoleId ¶ added in v0.6.1
func (*Service) GetUserRoleListByUserId ¶ added in v0.6.1
func (*Service) GetVariable ¶
func (*Service) GetVariableById ¶
func (*Service) GetVariableByKey ¶
func (*Service) GetVariableList ¶
func (*Service) UpdateTags ¶
Source Files ¶
- artifact_service.go
- base_service.go
- binder_basic.go
- binder_list.go
- data_collection_service.go
- data_source_service.go
- environment_service.go
- extra_value_service.go
- git_service.go
- interface.go
- job_service.go
- node_service.go
- options.go
- password_service.go
- permission_service.go
- plugin_service.go
- plugin_status_service.go
- project_service.go
- role_permission_service.go
- role_service.go
- schedule_service.go
- service.go
- setting_service.go
- spider_service.go
- spider_stat_service.go
- tag_service.go
- tag_service_legacy.go
- task_queue_service.go
- task_service.go
- task_stat_service.go
- token_service.go
- user_role_service.go
- user_service.go
- variable_service.go
Click to show internal directories.
Click to hide internal directories.