Documentation
¶
Index ¶
- type Service
- type ServiceImpl
- func (s *ServiceImpl) CreateAccount(ctx context.Context, account *models.Account) error
- func (s *ServiceImpl) CreateSession(ctx context.Context) (*models.Session, error)
- func (s *ServiceImpl) CreateSite(ctx context.Context, site *models.Site) error
- func (s *ServiceImpl) DeleteAccount(ctx context.Context, account *models.Account) error
- func (s *ServiceImpl) DeleteSession(ctx context.Context, session *models.Session) error
- func (s *ServiceImpl) DeleteSite(ctx context.Context, site *models.Site) error
- func (s *ServiceImpl) GetAccount(ctx context.Context, account *models.Account) error
- func (s *ServiceImpl) GetSession(ctx context.Context, session *models.Session) error
- func (s *ServiceImpl) GetSite(ctx context.Context, site *models.Site) error
- func (s *ServiceImpl) ListAccounts(ctx context.Context, accounts *[]*models.Account) error
- func (s *ServiceImpl) ListSessions(ctx context.Context, sessions *[]*models.Session) error
- func (s *ServiceImpl) UpdateAccount(ctx context.Context, account *models.Account) error
- func (s *ServiceImpl) UpdateSession(ctx context.Context, session *models.Session) error
- func (s *ServiceImpl) UpdateSite(ctx context.Context, site *models.Site) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
// Sessions is the session service.
ports.SessionService
// Accounts is the account service.
ports.AccountService
}
Service is the main service struct.
func NewService ¶
NewService creates a new service.
type ServiceImpl ¶
type ServiceImpl struct {
// contains filtered or unexported fields
}
ServiceImpl is the implementation of the Service interface.
func (*ServiceImpl) CreateAccount ¶
CreateAccount creates a new account in the database.
func (*ServiceImpl) CreateSession ¶
CreateSession creates a new session.
func (*ServiceImpl) CreateSite ¶
CreateSite creates a new site in the database.
func (*ServiceImpl) DeleteAccount ¶
DeleteAccount deletes an account from the database.
func (*ServiceImpl) DeleteSession ¶
DeleteSession deletes the session associated with the request.
func (*ServiceImpl) DeleteSite ¶
DeleteSite deletes a site from the database.
func (*ServiceImpl) GetAccount ¶
GetAccount returns the account with the given ID.
func (*ServiceImpl) GetSession ¶
GetSession returns the session associated with the request.
func (*ServiceImpl) ListAccounts ¶
ListAccounts returns the list of accounts.
func (*ServiceImpl) ListSessions ¶
ListSessions returns the list of sessions.
func (*ServiceImpl) UpdateAccount ¶
UpdateAccount updates an existing account in the database.
func (*ServiceImpl) UpdateSession ¶
UpdateSession updates the session associated with the request.
func (*ServiceImpl) UpdateSite ¶
UpdateSite updates a site in the database.