identity

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetMock

func ResetMock()

func SetMockHealthFunc

func SetMockHealthFunc(f func() (bool, error))

func SetMockSubToInfoFunc

func SetMockSubToInfoFunc(f func(from string, to []string) (*ClassificationLang, error))

func SetNewException

func SetNewException(e error)

func WithClassificationLang

func WithClassificationLang(data map[string][]*service.Info) classificationLangOpt

func WithClassificationLangFrom

func WithClassificationLangFrom(from *service.Info) classificationLangOpt

func WithClassificationLangFromLang

func WithClassificationLangFromLang(fromLang string) classificationLangOpt

func WithClassificationLangKeys

func WithClassificationLangKeys(keys []string) classificationLangOpt

func WithHttpClient

func WithHttpClient(httpClient myHttpClient) option

Types

type ClassificationLang

type ClassificationLang struct {
	From     *service.Info
	FromLang string
	// contains filtered or unexported fields
}

func NewClassificationLang

func NewClassificationLang(opts ...classificationLangOpt) *ClassificationLang

func (*ClassificationLang) GetInfos

func (c *ClassificationLang) GetInfos(lang string) []*service.Info

func (*ClassificationLang) GetLangs

func (c *ClassificationLang) GetLangs() []string

type Identity

type Identity interface {
	// return notify info and classification by lang
	SubToInfo(from string, to []string) (*ClassificationLang, error)
	service.Health
}

func NewIdentity

func NewIdentity(opts ...option) (Identity, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳