Documentation ¶
Index ¶
- func DecodeCursor(after *string) (*string, error)
- func EncodeCursor(i *string) graphql.ID
- func NewLogger(config *context.Config) *logging.Logger
- type AuthService
- type BrokerService
- func (b *BrokerService) GetModule(serviceName string, moduleID string) (*model.Module, error)
- func (b *BrokerService) GetModuleActiveJob(serviceName string, moduleID string) (*model.Job, error)
- func (b *BrokerService) GetModuleConfiguration(serviceName string, moduleID string) (*model.Configuration, error)
- func (b *BrokerService) GetModuleJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
- func (b *BrokerService) GetModuleJobs(serviceName string, moduleID string) (*[]*model.Job, error)
- func (b *BrokerService) GetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
- func (b *BrokerService) GetModuleProperty(serviceName string, moduleID string, propertyName string) (*model.Property, error)
- func (b *BrokerService) GetModuleSettings(serviceName string, moduleID string) (*[]*model.Property, error)
- func (b *BrokerService) GetModuleStatus(serviceName string, moduleID string) (*model.Status, error)
- func (b *BrokerService) GetModules(serviceName string) (*[]*model.Module, error)
- func (s *BrokerService) Module(ctx context.Context, moduleName string) (*model.Module, error)
- func (b *BrokerService) ModuleAvailableEvents(serviceName string, moduleID string) (*[]*model.Event, error)
- func (b *BrokerService) ModuleCancelJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
- func (b *BrokerService) ModuleSubmitEvent(serviceName string, moduleID string) (*model.Job, error)
- func (b *BrokerService) ModuleSubmitJob(serviceName string, moduleID string, action string, value string, ...) (*model.Job, error)
- func (b *BrokerService) SetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
- func (b *BrokerService) SetModuleProperty(serviceName string, moduleID string, property *pb.Property) (*model.Property, error)
- type ConfigureService
- func (c *ConfigureService) Count(confNamespace string) (int, error)
- func (c *ConfigureService) CreateConfiguration(conf *pb.Configuration) (*model.Configuration, error)
- func (c *ConfigureService) DeleteConfiguration(id string, namespace string) (*model.Configuration, error)
- func (c *ConfigureService) FindById(confId string, confNamespace string) (*model.Configuration, error)
- func (c *ConfigureService) List(confNamespace string, first *int32, after *string) ([]*model.Configuration, error)
- func (c *ConfigureService) UpdateConfiguration(id string, namespace string, conf *pb.Configuration) (*model.Configuration, error)
- type ManagerService
- func (c *ManagerService) Install() (*model.Response, error)
- func (c *ManagerService) Restart() (*model.Response, error)
- func (c *ManagerService) Start() (*model.Response, error)
- func (c *ManagerService) Status() (*[]*model.Property, error)
- func (c *ManagerService) Stop() (*model.Response, error)
- func (c *ManagerService) Uninstall() (*model.Response, error)
- func (c *ManagerService) Upgrade() (*model.Response, error)
- type RoleService
- func (r *RoleService) Count() (int, error)
- func (r *RoleService) CreateRole(role *model.Role) (*model.Role, error)
- func (r *RoleService) FindByName(name string) (*model.Role, error)
- func (r *RoleService) FindByUserId(userId *string) ([]*model.Role, error)
- func (r *RoleService) List(first *int32, after *string) ([]*model.Role, error)
- type UserService
- func (u *UserService) ComparePassword(userCredentials *model.UserCredentials) (*model.User, error)
- func (u *UserService) Count() (int, error)
- func (u *UserService) CreateUser(user *model.User) (*model.User, error)
- func (u *UserService) FindByEmail(email string) (*model.User, error)
- func (u *UserService) FindByID(id string) (*model.User, error)
- func (u *UserService) List(first *int32, after *string) ([]*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCursor ¶
func EncodeCursor ¶
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(config *context.Config, log *logging.Logger) *AuthService
func (*AuthService) ValidateJWT ¶
func (a *AuthService) ValidateJWT(tokenString *string) (*jwt.Token, error)
type BrokerService ¶ added in v0.1.2
type BrokerService struct {
// contains filtered or unexported fields
}
func NewBrokerService ¶ added in v0.1.2
func NewBrokerService(config *gcontext.Config, log *logging.Logger) *BrokerService
func (*BrokerService) GetModule ¶ added in v0.1.2
GetModule : Sends a GRPC request to the broker for all the properties of the Module
func (*BrokerService) GetModuleActiveJob ¶ added in v0.1.7
rpc GetModuleActiveJob(ModuleRequest) returns (JobResponse);
func (*BrokerService) GetModuleConfiguration ¶ added in v0.1.2
func (b *BrokerService) GetModuleConfiguration(serviceName string, moduleID string) (*model.Configuration, error)
rpc GetModuleConfiguration(ModuleRequest) returns (ConfigurationResponse);
func (*BrokerService) GetModuleJob ¶ added in v0.1.7
func (b *BrokerService) GetModuleJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
rpc GetModuleJob(ModuleRequest) returns (JobResponse);
func (*BrokerService) GetModuleJobs ¶ added in v0.1.7
rpc GetModuleJobs(ModuleRequest) returns (JobsResponse);
func (*BrokerService) GetModuleProperties ¶ added in v0.1.8
func (b *BrokerService) GetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
rpc GetModuleProperties(PropertyRequest) returns (PropertiesResponse);
func (*BrokerService) GetModuleProperty ¶ added in v0.1.8
func (b *BrokerService) GetModuleProperty(serviceName string, moduleID string, propertyName string) (*model.Property, error)
rpc GetModuleProperty(PropertyRequest) returns (PropertyResponse);
func (*BrokerService) GetModuleSettings ¶ added in v0.1.7
func (b *BrokerService) GetModuleSettings(serviceName string, moduleID string) (*[]*model.Property, error)
rpc GetModuleSettings(ModuleRequest) returns (SettingsResponse);
func (*BrokerService) GetModuleStatus ¶ added in v0.1.2
rpc GetModuleStatus(ModuleRequest) returns (StatusResponse); GetModuleStatus : Sends a GRPC request to the broker and expects a response that matches the Status model
func (*BrokerService) GetModules ¶ added in v0.1.7
func (b *BrokerService) GetModules(serviceName string) (*[]*model.Module, error)
rpc GetModules(Empty) return (ModulesResponse);
func (*BrokerService) ModuleAvailableEvents ¶ added in v0.1.7
func (b *BrokerService) ModuleAvailableEvents(serviceName string, moduleID string) (*[]*model.Event, error)
rpc ModuleAvailableEvents(ModuleRequest) returns (EventsResponse);
func (*BrokerService) ModuleCancelJob ¶ added in v0.1.7
func (b *BrokerService) ModuleCancelJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
rpc ModuleCancelJob(ModuleJobRequest) returns (JobResponse);
func (*BrokerService) ModuleSubmitEvent ¶ added in v0.1.7
rpc ModuleSubmitEvent(ModuleEventRequest) returns (JobResponse);
func (*BrokerService) ModuleSubmitJob ¶ added in v0.1.7
func (b *BrokerService) ModuleSubmitJob(serviceName string, moduleID string, action string, value string, properties []*pb.Property) (*model.Job, error)
rpc ModuleSubmitJob(ModuleJobRequest) returns (JobResponse);
func (*BrokerService) SetModuleProperties ¶ added in v0.1.8
func (b *BrokerService) SetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
rpc SetModuleProperties(PropertiesRequest) returns (PropertiesResponse);
func (*BrokerService) SetModuleProperty ¶ added in v0.1.8
func (b *BrokerService) SetModuleProperty(serviceName string, moduleID string, property *pb.Property) (*model.Property, error)
rpc SetModuleProperty(PropertyRequest) returns (PropertyResponse);
type ConfigureService ¶
type ConfigureService struct {
// contains filtered or unexported fields
}
func NewConfigureService ¶
func NewConfigureService(client pb.ConfigureEndpointClient, log *logging.Logger) *ConfigureService
func (*ConfigureService) Count ¶
func (c *ConfigureService) Count(confNamespace string) (int, error)
func (*ConfigureService) CreateConfiguration ¶ added in v0.1.7
func (c *ConfigureService) CreateConfiguration(conf *pb.Configuration) (*model.Configuration, error)
func (*ConfigureService) DeleteConfiguration ¶ added in v0.1.7
func (c *ConfigureService) DeleteConfiguration(id string, namespace string) (*model.Configuration, error)
func (*ConfigureService) FindById ¶
func (c *ConfigureService) FindById(confId string, confNamespace string) (*model.Configuration, error)
func (*ConfigureService) List ¶
func (c *ConfigureService) List(confNamespace string, first *int32, after *string) ([]*model.Configuration, error)
func (*ConfigureService) UpdateConfiguration ¶ added in v0.1.7
func (c *ConfigureService) UpdateConfiguration(id string, namespace string, conf *pb.Configuration) (*model.Configuration, error)
type ManagerService ¶ added in v0.2.1
type ManagerService struct {
// contains filtered or unexported fields
}
func NewManagerService ¶ added in v0.2.1
func NewManagerService(client pb.ManagerClient, log *logging.Logger) *ManagerService
func (*ManagerService) Install ¶ added in v0.2.1
func (c *ManagerService) Install() (*model.Response, error)
Install a plantd system
func (*ManagerService) Restart ¶ added in v0.2.1
func (c *ManagerService) Restart() (*model.Response, error)
Restart configured plantd services
func (*ManagerService) Start ¶ added in v0.2.1
func (c *ManagerService) Start() (*model.Response, error)
Start configured plantd services
func (*ManagerService) Status ¶ added in v0.2.1
func (c *ManagerService) Status() (*[]*model.Property, error)
Check the status of configured plantd services rpc Status (Empty) returns (ServiceResponse) {}
func (*ManagerService) Stop ¶ added in v0.2.1
func (c *ManagerService) Stop() (*model.Response, error)
Stop configured plantd services
type RoleService ¶
type RoleService struct {
// contains filtered or unexported fields
}
func NewRoleService ¶
func NewRoleService(db *sqlx.DB, log *logging.Logger) *RoleService
func (*RoleService) Count ¶
func (r *RoleService) Count() (int, error)
func (*RoleService) CreateRole ¶
func (*RoleService) FindByName ¶
func (r *RoleService) FindByName(name string) (*model.Role, error)
func (*RoleService) FindByUserId ¶
func (r *RoleService) FindByUserId(userId *string) ([]*model.Role, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *sqlx.DB, roleService *RoleService, log *logging.Logger) *UserService
func (*UserService) ComparePassword ¶
func (u *UserService) ComparePassword(userCredentials *model.UserCredentials) (*model.User, error)
func (*UserService) Count ¶
func (u *UserService) Count() (int, error)
func (*UserService) CreateUser ¶
func (*UserService) FindByEmail ¶
func (u *UserService) FindByEmail(email string) (*model.User, error)