welfare

package module
v0.0.0-...-d61954a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 7 Imported by: 0

README

Welfare-go

Enterprise welfare

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEncryptType

func WithEncryptType(encryptType string) internal.Option

WithEncryptType .

func WithFormat

func WithFormat(format string) internal.Option

WithFormat .

func WithLogPath

func WithLogPath(logPath string) internal.Option

WithLogPath .

func WithLoglevel

func WithLoglevel(loglevel log.Level) internal.Option

WithLoglevel .

func WithPrivateKey

func WithPrivateKey(privateKey string) internal.Option

WithPrivateKey .

func WithPrivateKeyDataType

func WithPrivateKeyDataType(dataType gocrypto.Encode) internal.Option

WithPrivateKeyDataType .

func WithPrivateKeyType

func WithPrivateKeyType(keyType gocrypto.Secret) internal.Option

WithPrivateKeyType .

func WithPublicKey

func WithPublicKey(publicKey string) internal.Option

WithPublicKey .

func WithPublicKeyDataType

func WithPublicKeyDataType(dataType gocrypto.Encode) internal.Option

WithPublicKeyDataType .

func WithRetryCount

func WithRetryCount(retryCount int) internal.Option

WithRetryCount with RetryCount option.

func WithSignType

func WithSignType(signType string) internal.Option

WithSignType .

func WithTimeout

func WithTimeout(timeout time.Duration) internal.Option

WithTimeout the Timeout option.

func WithVersion

func WithVersion(version string) internal.Option

WithVersion .

Types

type Welfare

type Welfare struct {
	// contains filtered or unexported fields
}

Welfare .

func New

func New(ctx context.Context, channel, environment string, opts ...internal.Option) (*Welfare, error)

New .create a new Welfare.

func (*Welfare) GetSecret

func (w *Welfare) GetSecret(ctx context.Context) (secret rsa.RSASecret, err error)

GetSecret get secret.

func (*Welfare) Init

func (w *Welfare) Init(ctx context.Context, opts ...internal.Option) error

Init .

func (*Welfare) InitSecret

func (w *Welfare) InitSecret(ctx context.Context, publicKey, privateKey string) error

InitSecret .

func (*Welfare) SetChannel

func (w *Welfare) SetChannel(ctx context.Context, channel string)

SetChannel .

func (*Welfare) SetLogger

func (w *Welfare) SetLogger(ctx context.Context, logger *log.Logger)

SetLogger .

func (*Welfare) SetPrivateKey

func (w *Welfare) SetPrivateKey(ctx context.Context, privateKey string)

SetPrivateKey .

func (*Welfare) SetPrivateKeyDataType

func (w *Welfare) SetPrivateKeyDataType(ctx context.Context, dataType gocrypto.Encode)

SetPrivateKeyDataType .

func (*Welfare) SetPrivateKeyType

func (w *Welfare) SetPrivateKeyType(ctx context.Context, keyType gocrypto.Secret)

SetPrivateKeyType .

func (*Welfare) SetPublicKey

func (w *Welfare) SetPublicKey(ctx context.Context, publicKey string)

SetPublicKey .

func (*Welfare) SetPublicKeyAndPrivateKey

func (w *Welfare) SetPublicKeyAndPrivateKey(ctx context.Context, publicKey, privateKey string)

SetPublicKeyAndPrivateKey .

func (*Welfare) SetPublicKeyDataType

func (w *Welfare) SetPublicKeyDataType(ctx context.Context, dataType gocrypto.Encode)

SetPublicKeyDataType .

Directories

Path Synopsis
pkg
log

Jump to

Keyboard shortcuts

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