service

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCursor

func DecodeCursor(after *string) (*string, error)

func EncodeCursor

func EncodeCursor(i *string) graphql.ID

func NewLogger

func NewLogger(config *context.Config) *logging.Logger

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(config *context.Config, log *logging.Logger) *AuthService

func (*AuthService) SignJWT

func (a *AuthService) SignJWT(user *model.User) (*string, error)

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

func (b *BrokerService) GetModule(serviceName string, moduleID string) (*model.Module, error)

GetModule : Sends a GRPC request to the broker for all the properties of the Module

func (*BrokerService) GetModuleActiveJob added in v0.1.7

func (b *BrokerService) GetModuleActiveJob(serviceName string, moduleID string) (*model.Job, error)

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

func (b *BrokerService) GetModuleJobs(serviceName string, moduleID string) (*[]*model.Job, error)

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

func (b *BrokerService) GetModuleStatus(serviceName string, moduleID string) (*model.Status, error)

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) Module added in v0.1.11

func (s *BrokerService) Module(ctx context.Context, moduleName string) (*model.Module, error)

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

func (b *BrokerService) ModuleSubmitEvent(serviceName string, moduleID string) (*model.Job, error)

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

func (*ManagerService) Uninstall added in v0.2.1

func (c *ManagerService) Uninstall() (*model.Response, error)

Uninstall a plantd system

func (*ManagerService) Upgrade added in v0.2.1

func (c *ManagerService) Upgrade() (*model.Response, error)

Upgrade a plantd system

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 (r *RoleService) CreateRole(role *model.Role) (*model.Role, error)

func (*RoleService) FindByName

func (r *RoleService) FindByName(name string) (*model.Role, error)

func (*RoleService) FindByUserId

func (r *RoleService) FindByUserId(userId *string) ([]*model.Role, error)

func (*RoleService) List

func (r *RoleService) List(first *int32, after *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 (u *UserService) CreateUser(user *model.User) (*model.User, error)

func (*UserService) FindByEmail

func (u *UserService) FindByEmail(email string) (*model.User, error)

func (*UserService) FindByID added in v0.1.7

func (u *UserService) FindByID(id string) (*model.User, error)

func (*UserService) List

func (u *UserService) List(first *int32, after *string) ([]*model.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL