Documentation ¶
Index ¶
- func WithEncryptType(encryptType string) internal.Option
- func WithFormat(format string) internal.Option
- func WithLogPath(logPath string) internal.Option
- func WithLoglevel(loglevel log.Level) internal.Option
- func WithPrivateKey(privateKey string) internal.Option
- func WithPrivateKeyDataType(dataType gocrypto.Encode) internal.Option
- func WithPrivateKeyType(keyType gocrypto.Secret) internal.Option
- func WithPublicKey(publicKey string) internal.Option
- func WithPublicKeyDataType(dataType gocrypto.Encode) internal.Option
- func WithRetryCount(retryCount int) internal.Option
- func WithSignType(signType string) internal.Option
- func WithTimeout(timeout time.Duration) internal.Option
- func WithVersion(version string) internal.Option
- type Welfare
- func (w *Welfare) GetSecret(ctx context.Context) (secret rsa.RSASecret, err error)
- func (w *Welfare) Init(ctx context.Context, opts ...internal.Option) error
- func (w *Welfare) InitSecret(ctx context.Context, publicKey, privateKey string) error
- func (w *Welfare) SetChannel(ctx context.Context, channel string)
- func (w *Welfare) SetLogger(ctx context.Context, logger *log.Logger)
- func (w *Welfare) SetPrivateKey(ctx context.Context, privateKey string)
- func (w *Welfare) SetPrivateKeyDataType(ctx context.Context, dataType gocrypto.Encode)
- func (w *Welfare) SetPrivateKeyType(ctx context.Context, keyType gocrypto.Secret)
- func (w *Welfare) SetPublicKey(ctx context.Context, publicKey string)
- func (w *Welfare) SetPublicKeyAndPrivateKey(ctx context.Context, publicKey, privateKey string)
- func (w *Welfare) SetPublicKeyDataType(ctx context.Context, dataType gocrypto.Encode)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPrivateKeyDataType ¶
WithPrivateKeyDataType .
func WithPrivateKeyType ¶
WithPrivateKeyType .
func WithPublicKeyDataType ¶
WithPublicKeyDataType .
func WithRetryCount ¶
WithRetryCount with RetryCount option.
func WithTimeout ¶
WithTimeout the Timeout option.
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) InitSecret ¶
InitSecret .
func (*Welfare) SetChannel ¶
SetChannel .
func (*Welfare) SetPrivateKey ¶
SetPrivateKey .
func (*Welfare) SetPrivateKeyDataType ¶
SetPrivateKeyDataType .
func (*Welfare) SetPrivateKeyType ¶
SetPrivateKeyType .
func (*Welfare) SetPublicKey ¶
SetPublicKey .
func (*Welfare) SetPublicKeyAndPrivateKey ¶
SetPublicKeyAndPrivateKey .
Click to show internal directories.
Click to hide internal directories.