Documentation
¶
Overview ¶
Package native provides the ability for Vela to integrate with the Database as a secret backend.
Usage:
import "github.com/go-vela/server/secret/native"
Index ¶
- type Client
- func (c *Client) Count(ctx context.Context, sType, org, name string, teams []string) (int64, error)
- func (c *Client) Create(ctx context.Context, sType, org, name string, s *api.Secret) (*api.Secret, error)
- func (c *Client) Delete(ctx context.Context, sType, org, name, path string) error
- func (c *Client) Driver() string
- func (c *Client) Get(ctx context.Context, sType, org, name, path string) (*api.Secret, error)
- func (c *Client) List(ctx context.Context, sType, org, name string, page, perPage int, ...) ([]*api.Secret, error)
- func (c *Client) Update(ctx context.Context, sType, org, name string, s *api.Secret) (*api.Secret, error)
- type ClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.27.0
type Client struct {
// client to interact with database for secret operations
Database database.Interface
// https://pkg.go.dev/github.com/sirupsen/logrus#Entry
Logger *logrus.Entry
}
Client represents a struct to hold native secret setup.
func (*Client) Create ¶ added in v0.27.0
func (c *Client) Create(ctx context.Context, sType, org, name string, s *api.Secret) (*api.Secret, error)
Create creates a new secret.
type ClientOpt ¶ added in v0.8.0
ClientOpt represents a configuration option to initialize the secret client for Native.
func WithDatabase ¶ added in v0.8.0
WithDatabase sets the Vela database service in the secret client for Native.
Click to show internal directories.
Click to hide internal directories.