Documentation
¶
Index ¶
- type ContainerService
- func (s *ContainerService) BuildTemplate(templateID string, tag string, env map[string]*string) error
- func (s *ContainerService) Create(container *model.Container) (*model.Container, error)
- func (s *ContainerService) DeleteContainer(containerID string) error
- func (s *ContainerService) FillPorts(minPort, maxPort int) error
- func (s *ContainerService) GetAll() ([]model.Container, error)
- func (s *ContainerService) GetByID(id string) (*model.Container, error)
- func (s *ContainerService) GetImages() ([]model.Image, error)
- func (s *ContainerService) GetPortCount() (int, error)
- func (s *ContainerService) StartContainer(containerID string) error
- func (s *ContainerService) StopContainer(containerID string) error
- func (s *ContainerService) Update(container *model.Container) (*model.Container, error)
- type TemplateService
- func (s *TemplateService) Create(template *model.Template) (*model.Template, error)
- func (s *TemplateService) Delete(id string) error
- func (s *TemplateService) GetAll() ([]*model.Template, error)
- func (s *TemplateService) GetByID(id string) (*model.Template, error)
- func (s *TemplateService) Update(template *model.Template) (*model.Template, error)
- type TokenService
- func (s *TokenService) CreateForUser(userID string) (*model.Token, error)
- func (s *TokenService) CreateUnsafe(token *model.Token) (*model.Token, error)
- func (s *TokenService) Delete(token string) error
- func (s *TokenService) GetByTokenKey(token string) (*model.Token, error)
- func (s *TokenService) Validate(token string) (bool, error)
- type UserService
- func (s *UserService) CheckToken(token string) (*model.User, error)
- func (s *UserService) Create(user *model.User) (*model.User, error)
- func (s *UserService) Delete(id string) error
- func (s *UserService) GetAll() ([]model.User, error)
- func (s *UserService) GetByID(id string) (model.User, error)
- func (s *UserService) GetUnsafeByUsername(username string) (*model.User, error)
- func (s *UserService) Login(loginRequest *model.LoginRequest) (*model.LoginResponse, error)
- func (s *UserService) Update(user model.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerService ¶
type ContainerService struct {
// contains filtered or unexported fields
}
func NewContainerService ¶
func NewContainerService(dbrepo dbrepo, dockerrepo dockerrepo, templaterepo templaterepo, l log.Writer, cfg config.Configuration, ) *ContainerService
func (*ContainerService) BuildTemplate ¶
func (*ContainerService) DeleteContainer ¶
func (s *ContainerService) DeleteContainer(containerID string) error
func (*ContainerService) FillPorts ¶
func (s *ContainerService) FillPorts(minPort, maxPort int) error
func (*ContainerService) GetByID ¶
func (s *ContainerService) GetByID(id string) (*model.Container, error)
func (*ContainerService) GetPortCount ¶
func (s *ContainerService) GetPortCount() (int, error)
func (*ContainerService) StartContainer ¶
func (s *ContainerService) StartContainer(containerID string) error
func (*ContainerService) StopContainer ¶
func (s *ContainerService) StopContainer(containerID string) error
type TemplateService ¶
type TemplateService struct {
// contains filtered or unexported fields
}
func NewTemplateService ¶
func NewTemplateService(dbrepo templaterepo) *TemplateService
func (*TemplateService) Delete ¶
func (s *TemplateService) Delete(id string) error
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(repo tokenrepo, cfg config.Configuration) *TokenService
func (*TokenService) CreateForUser ¶
func (s *TokenService) CreateForUser(userID string) (*model.Token, error)
func (*TokenService) CreateUnsafe ¶
func (*TokenService) Delete ¶
func (s *TokenService) Delete(token string) error
func (*TokenService) GetByTokenKey ¶
func (s *TokenService) GetByTokenKey(token string) (*model.Token, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo userrepo, tokenService *TokenService, cfg config.Configuration) *UserService
func (*UserService) CheckToken ¶
func (s *UserService) CheckToken(token string) (*model.User, error)
func (*UserService) Delete ¶
func (s *UserService) Delete(id string) error
func (*UserService) GetUnsafeByUsername ¶
func (s *UserService) GetUnsafeByUsername(username string) (*model.User, error)
func (*UserService) Login ¶
func (s *UserService) Login(loginRequest *model.LoginRequest) (*model.LoginResponse, error)
Click to show internal directories.
Click to hide internal directories.