Documentation
¶
Index ¶
- Variables
- type AuthConfigService
- func (s AuthConfigService) GetByKey(ctx context.Context, key string) (*model.AuthConfig, error)
- func (s AuthConfigService) GetWithoutTransform(ctx context.Context, key string) (*model.AuthConfig, error)
- func (s AuthConfigService) Init(ctx context.Context) error
- func (s AuthConfigService) List(ctx context.Context) ([]model.AuthConfig, error)
- func (s AuthConfigService) SetConfig(ctx context.Context, key string, cfg configurator.Configurator) error
- func (s AuthConfigService) Trx(db *gorm.DB) IAuthConfigService
- func (s AuthConfigService) Update(ctx context.Context, key string, input json.RawMessage) (string, 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: "Config not found"}), apperr.WithCode(code.NotFound), ) ErrAuthConfigAlreadyExists = apperr.New("auth_config_already_exists", apperr.WithTextTranslate(translator.Translate{translator.RU: "Конфигурация уже существует", translator.EN: "Config already exists"}), apperr.WithCode(code.AlreadyExists), ) )
Functions ¶
This section is empty.
Types ¶
type AuthConfigService ¶
type AuthConfigService struct {
// contains filtered or unexported fields
}
func NewAuthConfigService ¶
func NewAuthConfigService(repo repository.AuthConfigRepository) AuthConfigService
func (AuthConfigService) GetByKey ¶
func (s AuthConfigService) GetByKey(ctx context.Context, key string) (*model.AuthConfig, error)
func (AuthConfigService) GetWithoutTransform ¶ added in v2.4.0
func (s AuthConfigService) GetWithoutTransform(ctx context.Context, key string) (*model.AuthConfig, error)
func (AuthConfigService) List ¶
func (s AuthConfigService) List(ctx context.Context) ([]model.AuthConfig, error)
func (AuthConfigService) SetConfig ¶ added in v2.4.0
func (s AuthConfigService) SetConfig(ctx context.Context, key string, cfg configurator.Configurator) 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) (string, error)
type IAuthConfigService ¶
type IAuthConfigService interface {
Trx(db *gorm.DB) IAuthConfigService
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) (string, error)
Init(ctx context.Context) error
SetConfig(ctx context.Context, key string, cfg configurator.Configurator) error
GetWithoutTransform(ctx context.Context, key string) (*model.AuthConfig, error)
}
Click to show internal directories.
Click to hide internal directories.