service

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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 (s *ContainerService) BuildTemplate(templateID string, tag string, env map[string]*string) error

func (*ContainerService) Create

func (s *ContainerService) Create(container *model.Container) (*model.Container, error)

func (*ContainerService) DeleteContainer

func (s *ContainerService) DeleteContainer(containerID string) error

func (*ContainerService) FillPorts

func (s *ContainerService) FillPorts(minPort, maxPort int) error

func (*ContainerService) GetAll

func (s *ContainerService) GetAll() ([]model.Container, error)

func (*ContainerService) GetByID

func (s *ContainerService) GetByID(id string) (*model.Container, error)

func (*ContainerService) GetImages

func (s *ContainerService) GetImages() ([]model.Image, 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

func (*ContainerService) Update

func (s *ContainerService) Update(container *model.Container) (*model.Container, error)

type TemplateService

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

func NewTemplateService

func NewTemplateService(dbrepo templaterepo) *TemplateService

func (*TemplateService) Create

func (s *TemplateService) Create(template *model.Template) (*model.Template, error)

func (*TemplateService) Delete

func (s *TemplateService) Delete(id string) error

func (*TemplateService) GetAll

func (s *TemplateService) GetAll() ([]*model.Template, error)

func (*TemplateService) GetByID

func (s *TemplateService) GetByID(id string) (*model.Template, error)

func (*TemplateService) Update

func (s *TemplateService) Update(template *model.Template) (*model.Template, 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 (s *TokenService) CreateUnsafe(token *model.Token) (*model.Token, error)

func (*TokenService) Delete

func (s *TokenService) Delete(token string) error

func (*TokenService) GetByTokenKey

func (s *TokenService) GetByTokenKey(token string) (*model.Token, error)

func (*TokenService) Validate

func (s *TokenService) Validate(token string) (bool, 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) Create

func (s *UserService) Create(user *model.User) (*model.User, error)

func (*UserService) Delete

func (s *UserService) Delete(id string) error

func (*UserService) GetAll

func (s *UserService) GetAll() ([]model.User, error)

func (*UserService) GetByID

func (s *UserService) GetByID(id string) (model.User, 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)

func (*UserService) Update

func (s *UserService) Update(user model.User) error

Jump to

Keyboard shortcuts

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