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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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