Documentation
¶
Index ¶
- Variables
- type AuthConfigService
- func (s AuthConfigService) CreateDefault(ctx context.Context, key string) (*model.AuthConfig, error)
- func (s *AuthConfigService) Delete(ctx context.Context, key string) error
- func (s AuthConfigService) GetByKey(ctx context.Context, key string) (*model.AuthConfig, error)
- func (s *AuthConfigService) Init() error
- func (s AuthConfigService) List(ctx context.Context) ([]model.AuthConfig, error)
- func (s AuthConfigService) Trx(db *gorm.DB) IAuthConfigService
- func (s AuthConfigService) Update(ctx context.Context, key string, input json.RawMessage) error
- type IAuthConfigService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthConfigNotFound = apperr.New("auth_config_not_found", apperr.WithTextTranslate(translator.Translate{translator.RU: "Конфигурация не найдена", translator.EN: "Auth config not found"}), apperr.WithCode(code.NotFound), ) ErrAuthConfigAlreadyExists = apperr.New("auth_config_already_exists", apperr.WithTextTranslate(translator.Translate{translator.RU: "Конфигурация уже существует", translator.EN: "Auth config already exists"}), apperr.WithCode(code.AlreadyExists), ) ErrKeyNotFound = apperr.New("key_not_found", apperr.WithTextTranslate(translator.Translate{translator.RU: "Ключ не найден", translator.EN: "Key not found"}), apperr.WithCode(code.NotFound), ) )
Functions ¶
This section is empty.
Types ¶
type AuthConfigService ¶
type AuthConfigService struct {
// contains filtered or unexported fields
}
func (AuthConfigService) CreateDefault ¶
func (s AuthConfigService) CreateDefault(ctx context.Context, key string) (*model.AuthConfig, error)
func (*AuthConfigService) Delete ¶
func (s *AuthConfigService) Delete(ctx context.Context, key string) error
func (AuthConfigService) GetByKey ¶
func (s AuthConfigService) GetByKey(ctx context.Context, key string) (*model.AuthConfig, error)
func (*AuthConfigService) Init ¶
func (s *AuthConfigService) Init() error
func (AuthConfigService) List ¶
func (s AuthConfigService) List(ctx context.Context) ([]model.AuthConfig, error)
func (AuthConfigService) Trx ¶
func (s AuthConfigService) Trx(db *gorm.DB) IAuthConfigService
func (AuthConfigService) Update ¶
func (s AuthConfigService) Update(ctx context.Context, key string, input json.RawMessage) error
type IAuthConfigService ¶
type IAuthConfigService interface {
Trx(db *gorm.DB) IAuthConfigService
CreateDefault(ctx context.Context, key string) (*model.AuthConfig, error)
List(ctx context.Context) ([]model.AuthConfig, error)
GetByKey(ctx context.Context, key string) (*model.AuthConfig, error)
Update(ctx context.Context, key string, input json.RawMessage) error
}
func NewAuthConfigService ¶
func NewAuthConfigService(repo repository.AuthConfigRepository, tmpls transformer.AuthConfigTransformers) (IAuthConfigService, error)
Click to show internal directories.
Click to hide internal directories.