Documentation
¶
Index ¶
- Constants
- type Controller
- func (this *Controller) CreateInstance(instance model.Instance, userId string, token string) (result model.Instance, err error, code int)
- func (this *Controller) DeleteInstances(token string, ids []string) (err error, errCode int)
- func (this *Controller) EnsureAllInstancesDeployed() (err error)
- func (this *Controller) ListInstances(token string, limit int64, offset int64, sort string, asc bool, search string, ...) (results []model.Instance, total int, err error, errCode int)
- func (this *Controller) ReadInstance(token string, id string) (result model.Instance, err error, errCode int)
- func (this *Controller) SetInstance(instance model.Instance, userId string, token string) (err error, code int)
- type Database
- type DeploymentClient
- type Driver
- type KafkaAdmin
Constants ¶
View Source
const Permv2topic = "kafka2mqtt"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(config config.Config, db Database, deploymentClient DeploymentClient, verifier *verification.Verifier, permv2 permv2.Client) (*Controller, error)
func (*Controller) CreateInstance ¶
func (*Controller) DeleteInstances ¶
func (this *Controller) DeleteInstances(token string, ids []string) (err error, errCode int)
func (*Controller) EnsureAllInstancesDeployed ¶
func (this *Controller) EnsureAllInstancesDeployed() (err error)
func (*Controller) ListInstances ¶
func (*Controller) ReadInstance ¶
func (*Controller) SetInstance ¶
type Database ¶
type Database interface { ListInstances(ctx context.Context, limit int64, offset int64, sort string, asc bool, search string, includeGenerated bool, ids []string) (result []model.Instance, err error) GetInstance(ctx context.Context, id string) (instance model.Instance, exists bool, err error) SetInstance(ctx context.Context, instance model.Instance) error GetInstances(ctx context.Context, ids []string) (result []model.Instance, allExist bool, err error) RemoveInstances(ctx context.Context, ids []string) error }
type DeploymentClient ¶
type DeploymentClient interface { CreateContainer(name string, image string, userid string, env map[string]string, restart bool) (id string, err error) UpdateContainer(id string, name string, image string, userid string, env map[string]string, restart bool) (newId string, err error) RemoveContainer(id string) (err error) ContainerExists(id string) (exists bool, err error) }
Click to show internal directories.
Click to hide internal directories.