Documentation ¶
Index ¶
- func DecodeCursor(after *string) (*string, error)
- func EncodeCursor(i *string) graphql.ID
- 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 (b *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 StandardLogger
- 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 *StandardLogger) *AuthService
func (*AuthService) ValidateJWT ¶
func (a *AuthService) ValidateJWT(tokenString *string) (*jwt.Token, error)
type BrokerService ¶
type BrokerService struct {
// contains filtered or unexported fields
}
func NewBrokerService ¶
func NewBrokerService(config *gcontext.Config, logger *StandardLogger) *BrokerService
func (*BrokerService) GetModule ¶
GetModule : Sends a GRPC request to the broker for all the properties of the Module
func (*BrokerService) GetModuleActiveJob ¶
rpc GetModuleActiveJob(ModuleRequest) returns (JobResponse);
func (*BrokerService) GetModuleConfiguration ¶
func (b *BrokerService) GetModuleConfiguration(serviceName string, moduleID string) (*model.Configuration, error)
rpc GetModuleConfiguration(ModuleRequest) returns (ConfigurationResponse);
func (*BrokerService) GetModuleJob ¶
func (b *BrokerService) GetModuleJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
rpc GetModuleJob(ModuleRequest) returns (JobResponse);
func (*BrokerService) GetModuleJobs ¶
rpc GetModuleJobs(ModuleRequest) returns (JobsResponse);
func (*BrokerService) GetModuleProperties ¶
func (b *BrokerService) GetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
rpc GetModuleProperties(PropertyRequest) returns (PropertiesResponse);
func (*BrokerService) GetModuleProperty ¶
func (b *BrokerService) GetModuleProperty(serviceName string, moduleID string, propertyName string) (*model.Property, error)
rpc GetModuleProperty(PropertyRequest) returns (PropertyResponse);
func (*BrokerService) GetModuleSettings ¶
func (b *BrokerService) GetModuleSettings(serviceName string, moduleID string) (*[]*model.Property, error)
rpc GetModuleSettings(ModuleRequest) returns (SettingsResponse);
func (*BrokerService) GetModuleStatus ¶
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 ¶
func (b *BrokerService) GetModules(serviceName string) (*[]*model.Module, error)
rpc GetModules(Empty) return (ModulesResponse);
func (*BrokerService) ModuleAvailableEvents ¶
func (b *BrokerService) ModuleAvailableEvents(serviceName string, moduleID string) (*[]*model.Event, error)
rpc ModuleAvailableEvents(ModuleRequest) returns (EventsResponse);
func (*BrokerService) ModuleCancelJob ¶
func (b *BrokerService) ModuleCancelJob(serviceName string, moduleID string, jobID string) (*model.Job, error)
rpc ModuleCancelJob(ModuleJobRequest) returns (JobResponse);
func (*BrokerService) ModuleSubmitEvent ¶
rpc ModuleSubmitEvent(ModuleEventRequest) returns (JobResponse);
func (*BrokerService) ModuleSubmitJob ¶
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 ¶
func (b *BrokerService) SetModuleProperties(serviceName string, moduleID string, properties []*pb.Property) ([]*model.Property, error)
rpc SetModuleProperties(PropertiesRequest) returns (PropertiesResponse);
func (*BrokerService) SetModuleProperty ¶
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 *StandardLogger) *ConfigureService
func (*ConfigureService) Count ¶
func (c *ConfigureService) Count(confNamespace string) (int, error)
func (*ConfigureService) CreateConfiguration ¶
func (c *ConfigureService) CreateConfiguration(conf *pb.Configuration) (*model.Configuration, error)
func (*ConfigureService) DeleteConfiguration ¶
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 ¶
func (c *ConfigureService) UpdateConfiguration(id string, namespace string, conf *pb.Configuration) (*model.Configuration, error)
type ManagerService ¶
type ManagerService struct {
// contains filtered or unexported fields
}
func NewManagerService ¶
func NewManagerService(client pb.ManagerClient, log *StandardLogger) *ManagerService
func (*ManagerService) Install ¶
func (c *ManagerService) Install() (*model.Response, error)
Install a plantd system
func (*ManagerService) Restart ¶
func (c *ManagerService) Restart() (*model.Response, error)
Restart configured plantd services
func (*ManagerService) Start ¶
func (c *ManagerService) Start() (*model.Response, error)
Start configured plantd services
func (*ManagerService) Status ¶
func (c *ManagerService) Status() (*[]*model.Property, error)
Check the status of configured plantd services rpc Status (Empty) returns (ServiceResponse) {}
func (*ManagerService) Stop ¶
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 *StandardLogger) *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 StandardLogger ¶
func NewLogger ¶
func NewLogger(config *context.Config) *StandardLogger
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *sqlx.DB, roleService *RoleService, log *StandardLogger) *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)