Documentation ¶
Index ¶
- type Api
- func (api *Api) AssignRoleToUser(tctx *logger.TraceContext, roleName string, userName string) (err error)
- func (api *Api) Bootstrap(tctx *logger.TraceContext, isRecreate bool) (err error)
- func (api *Api) CreateOrUpdateNodeService(tctx *logger.TraceContext, input *base_spec.UpdateNodeService) (err error)
- func (api *Api) CreateOrUpdateService(tctx *logger.TraceContext, input *base_spec.UpdateService) (err error)
- func (api *Api) CreateProject(tctx *logger.TraceContext, name string, projectRoleName string) (err error)
- func (api *Api) CreateProjectRole(tctx *logger.TraceContext, name string) (err error)
- func (api *Api) CreateRole(tctx *logger.TraceContext, name string, projectName string) (err error)
- func (api *Api) CreateUser(tctx *logger.TraceContext, name string, password string) (err error)
- func (api *Api) DeleteNodeService(tctx *logger.TraceContext, input *base_spec.DeleteNodeService) (err error)
- func (api *Api) DeleteNodeServices(tctx *logger.TraceContext, input []base_spec.NodeService) (err error)
- func (api *Api) GetNodeService(tctx *logger.TraceContext, input *base_spec.GetNodeService, ...) (data *base_spec.NodeService, err error)
- func (api *Api) GetNodeServices(tctx *logger.TraceContext, input *base_spec.GetNodeServices, ...) (data []base_spec.NodeService, err error)
- func (api *Api) GetServices(tctx *logger.TraceContext, input *base_spec.GetServices) (data *base_spec.GetServicesData, err error)
- func (api *Api) GetUserAuthority(tctx *logger.TraceContext, username string) (userAuthority *base_spec.UserAuthority, err error)
- func (api *Api) GetUserWithValidatePassword(tctx *logger.TraceContext, name string, password string) (user *base_db_model.User, code uint8, err error)
- func (api *Api) GetUsers(tctx *logger.TraceContext, projectName string) (users []base_db_model.CustomUser, err error)
- func (api *Api) IssueToken(userName string) (token string, err error)
- func (api *Api) LoginWithToken(tctx *logger.TraceContext, token string) (data *base_spec.UserAuthority, err error)
- func (api *Api) MustClose()
- func (api *Api) MustOpen()
- func (api *Api) SyncNodeServiceRole(tctx *logger.TraceContext, kind string) (nodes []base_db_model.NodeService, err error)
- func (api *Api) SyncNodeServiceState(tctx *logger.TraceContext) (err error)
- func (api *Api) Transact(tctx *logger.TraceContext, txFunc func(tx *gorm.DB) (err error)) (err error)
- func (api *Api) UpdateUserPassword(tctx *logger.TraceContext, name string, password string) (err error)
- type IApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
func New ¶
func New(baseConf *base_config.Config, appConf *base_config.AppConfig, apiQueryMap map[string]map[string]base_spec_model.QueryModel) *Api
func (*Api) AssignRoleToUser ¶
func (*Api) Bootstrap ¶
func (api *Api) Bootstrap(tctx *logger.TraceContext, isRecreate bool) (err error)
func (*Api) CreateOrUpdateNodeService ¶
func (api *Api) CreateOrUpdateNodeService(tctx *logger.TraceContext, input *base_spec.UpdateNodeService) (err error)
func (*Api) CreateOrUpdateService ¶
func (api *Api) CreateOrUpdateService(tctx *logger.TraceContext, input *base_spec.UpdateService) (err error)
func (*Api) CreateProject ¶
func (*Api) CreateProjectRole ¶
func (api *Api) CreateProjectRole(tctx *logger.TraceContext, name string) (err error)
func (*Api) CreateRole ¶
func (*Api) CreateUser ¶
func (*Api) DeleteNodeService ¶
func (api *Api) DeleteNodeService(tctx *logger.TraceContext, input *base_spec.DeleteNodeService) (err error)
func (*Api) DeleteNodeServices ¶
func (api *Api) DeleteNodeServices(tctx *logger.TraceContext, input []base_spec.NodeService) (err error)
func (*Api) GetNodeService ¶
func (api *Api) GetNodeService(tctx *logger.TraceContext, input *base_spec.GetNodeService, user *base_spec.UserAuthority) (data *base_spec.NodeService, err error)
func (*Api) GetNodeServices ¶
func (api *Api) GetNodeServices(tctx *logger.TraceContext, input *base_spec.GetNodeServices, user *base_spec.UserAuthority) (data []base_spec.NodeService, err error)
func (*Api) GetServices ¶
func (api *Api) GetServices(tctx *logger.TraceContext, input *base_spec.GetServices) (data *base_spec.GetServicesData, err error)
func (*Api) GetUserAuthority ¶
func (api *Api) GetUserAuthority(tctx *logger.TraceContext, username string) (userAuthority *base_spec.UserAuthority, err error)
func (*Api) GetUserWithValidatePassword ¶
func (api *Api) GetUserWithValidatePassword(tctx *logger.TraceContext, name string, password string) (user *base_db_model.User, code uint8, err error)
func (*Api) GetUsers ¶
func (api *Api) GetUsers(tctx *logger.TraceContext, projectName string) (users []base_db_model.CustomUser, err error)
func (*Api) LoginWithToken ¶
func (api *Api) LoginWithToken(tctx *logger.TraceContext, token string) (data *base_spec.UserAuthority, err error)
func (*Api) SyncNodeServiceRole ¶
func (api *Api) SyncNodeServiceRole(tctx *logger.TraceContext, kind string) (nodes []base_db_model.NodeService, err error)
func (*Api) SyncNodeServiceState ¶
func (api *Api) SyncNodeServiceState(tctx *logger.TraceContext) (err error)
func (*Api) UpdateUserPassword ¶
type IApi ¶
type IApi interface { MustOpen() MustClose() GetUserWithValidatePassword(tctx *logger.TraceContext, name string, password string) (user *base_db_model.User, code uint8, err error) GetUserAuthority(tctx *logger.TraceContext, username string) (data *base_spec.UserAuthority, err error) CreateOrUpdateService(tctx *logger.TraceContext, input *base_spec.UpdateService) (err error) GetServices(tctx *logger.TraceContext, input *base_spec.GetServices) (data *base_spec.GetServicesData, err error) CreateOrUpdateNodeService(tctx *logger.TraceContext, input *base_spec.UpdateNodeService) (err error) SyncNodeServiceRole(tctx *logger.TraceContext, kind string) (nodes []base_db_model.NodeService, err error) SyncNodeServiceState(tctx *logger.TraceContext) (err error) LoginWithToken(tctx *logger.TraceContext, token string) (data *base_spec.UserAuthority, err error) IssueToken(userName string) (token string, err error) }
Click to show internal directories.
Click to hide internal directories.