service

package
v2.3.221 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 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: "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 (AuthConfigService) Trx

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
}

Jump to

Keyboard shortcuts

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