service

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 (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) Init

func (s AuthConfigService) Init(ctx context.Context) error

func (AuthConfigService) List

func (AuthConfigService) SetConfig added in v2.4.0

func (AuthConfigService) Trx

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)
}

Jump to

Keyboard shortcuts

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