config

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package config implements the functions, types, and interfaces for the module.

Package config implements the functions, types, and interfaces for the module.

Index

Constants

View Source
const (
	EnvPrefix = "ORIGADMIN_SERVICE"
)

Variables

View Source
var (
	// ErrNotFound defined error from kratos config package
	ErrNotFound = kratosconfig.ErrNotFound
)

Functions

This section is empty.

Types

type Config

type Config = kratosconfig.Config

Define types from kratos config package

func New

func New(opts ...Option) Config

New returns a new config instance

type Decoder

type Decoder = kratosconfig.Decoder

Define types from kratos config package

type Encoder

type Encoder func(v any) ([]byte, error)

Encoder is a function that takes a value and returns a byte slice and an error.

type KeyValue

type KeyValue = kratosconfig.KeyValue

Define types from kratos config package

type Merge

type Merge = kratosconfig.Merge

Define types from kratos config package

type Observer

type Observer = kratosconfig.Observer

Define types from kratos config package

type Option

type Option = kratosconfig.Option

Define types from kratos config package

func WithDecoder

func WithDecoder(d Decoder) Option

WithDecoder sets the decoder

func WithMergeFunc

func WithMergeFunc(m Merge) Option

WithMergeFunc sets the merge function

func WithResolveActualTypes

func WithResolveActualTypes(enableConvertToType bool) Option

WithResolveActualTypes enables resolving actual types

func WithResolver

func WithResolver(r Resolver) Option

WithResolver sets the resolver

func WithSource

func WithSource(s ...Source) Option

WithSource sets the source

type Reader

type Reader = kratosconfig.Reader

Define types from kratos config package

type Resolver

type Resolver = kratosconfig.Resolver

Define types from kratos config package

type Source

type Source = kratosconfig.Source

Define types from kratos config package

type SourceOption

type SourceOption struct {
	Options []Option
	Decoder Decoder
	Encoder Encoder
}

type SourceOptionSetting added in v0.0.4

type SourceOptionSetting = func(s *SourceOption)

SourceOptionSetting is a function that takes a pointer to a SourceOption struct and modifies it.

func WithOptions

func WithOptions(options ...Option) SourceOptionSetting

WithOptions sets the options field of the SourceOption struct.

type Value

type Value = kratosconfig.Value

Define types from kratos config package

type Watcher

type Watcher = kratosconfig.Watcher

Define types from kratos config package

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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