provider

package
v0.0.0-...-b68290d Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "secretProvider"

Variables

View Source
var (
	AddProvider = func(o Provider) { container[o.Type()] = o }
	GetProvider = func(t secret.Vendor) Provider { return container[t] }

	InitProvider = func(conf Conf) {
		l := log.Sub(AppName)
		for _, o := range container {
			o.Init(conf)
			l.Info("add provider", slog.String("name", o.Name()), slog.Any("type", o.Type()))
		}
	}
)

Functions

This section is empty.

Types

type Ali

type Ali struct{}

type Conf

type Conf struct {
	Ali     *Ali     `json:"ali" yaml:"ali"`
	Tencent *Tencent `json:"tencent" yaml:"tencent"`
}

type Provider

type Provider interface {
	Name() string
	Type() secret.Vendor
	Init(Conf)

	SyncResource(request *secret.SyncResourceRequest, server secret.Rpc_SyncResourceServer) error
}

type Tencent

type Tencent struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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