Documentation ¶
Index ¶
- type RegistryService
- func (s *RegistryService) Create(ctx context.Context, registry model.Registry) (int64, error)
- func (s *RegistryService) DeleteByID(ctx context.Context, registryID, userID int64) error
- func (s *RegistryService) GetByDomain(ctx context.Context, domain string) (model.Registry, error)
- func (s *RegistryService) GetByID(ctx context.Context, registryID, userID int64) (model.Registry, error)
- func (s *RegistryService) GetByUserID(ctx context.Context, userID int64) ([]model.Registry, error)
- func (s *RegistryService) UpdateAllowImages(ctx context.Context, userID int64, allows []string, blockMessage string) (retErr error)
- func (s *RegistryService) UpdateAnonymousData(ctx context.Context, userID int64, attr model.TokenAttr) (retErr error)
- func (s *RegistryService) UpdateByID(ctx context.Context, registryID, userID int64, registry model.Registry) error
- func (s *RegistryService) UpdateIPData(ctx context.Context, userID int64, ips []string, attr model.TokenAttr) (retErr error)
- type TokenService
- func (s *TokenService) Create(ctx context.Context, token model.Token) (int64, error)
- func (s *TokenService) Delete(ctx context.Context, tokenID, userID int64) error
- func (s *TokenService) Get(ctx context.Context, tokenID, userID int64) (model.Token, error)
- func (s *TokenService) GetByAccount(ctx context.Context, userID int64, account, password string) (model.Token, error)
- func (s *TokenService) GetByUserID(ctx context.Context, userID int64) ([]model.Token, error)
- type UserService
- func (s *UserService) Create(ctx context.Context, nickname, account, password string) (int64, error)
- func (s *UserService) GetByID(ctx context.Context, id int64) (model.User, error)
- func (s *UserService) GetLoginByAccount(ctx context.Context, account string) (model.Login, error)
- func (s *UserService) GetLoginByID(ctx context.Context, id int64) (model.Login, error)
- func (s *UserService) UpdateNickname(ctx context.Context, id int64, nickname string) error
- func (s *UserService) UpdatePassword(ctx context.Context, account, newPassword string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegistryService ¶
type RegistryService struct {
// contains filtered or unexported fields
}
func NewRegistryService ¶
func NewRegistryService(db *sql.DB, registryDao *dao.Registry) *RegistryService
func (*RegistryService) DeleteByID ¶
func (s *RegistryService) DeleteByID(ctx context.Context, registryID, userID int64) error
func (*RegistryService) GetByDomain ¶
func (*RegistryService) GetByUserID ¶
func (*RegistryService) UpdateAllowImages ¶
func (*RegistryService) UpdateAnonymousData ¶
func (*RegistryService) UpdateByID ¶
func (*RegistryService) UpdateIPData ¶
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(db *sql.DB, tokenDao *dao.Token) *TokenService
func (*TokenService) Delete ¶
func (s *TokenService) Delete(ctx context.Context, tokenID, userID int64) error
func (*TokenService) GetByAccount ¶
func (*TokenService) GetByUserID ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func (*UserService) GetLoginByAccount ¶
func (*UserService) GetLoginByID ¶
func (*UserService) UpdateNickname ¶
func (*UserService) UpdatePassword ¶
func (s *UserService) UpdatePassword(ctx context.Context, account, newPassword string) error
Click to show internal directories.
Click to hide internal directories.