secret

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package secret provides the ability for Vela to integrate with different supported Secret backends.

Usage:

import "github.com/go-vela/server/secret"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(c Setter, key string, s Service)

ToContext adds the secret Service to this context if it supports the Setter interface.

Types

type Service

type Service interface {
	// Get defines a function that captures a secret.
	Get(string, string, string, string) (*library.Secret, error)
	// List defines a function that captures a list of secrets.
	List(string, string, string, int, int) ([]*library.Secret, error)
	// Count defines a function that counts a list of secrets.
	Count(string, string, string) (int64, error)
	// Create defines a function that creates a new secret.
	Create(string, string, string, *library.Secret) error
	// Update defines a function that updates an existing secret.
	Update(string, string, string, *library.Secret) error
	// Delete defines a function that deletes a secret.
	Delete(string, string, string, string) error
}

Service represents the interface for Vela integrating with the different supported secret providers.

func FromContext

func FromContext(c context.Context, key string) Service

FromContext returns the secret Service associated with this context.

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Directories

Path Synopsis
Package native provides the ability for Vela to integrate with the Database as a secret backend.
Package native provides the ability for Vela to integrate with the Database as a secret backend.
Package vault provides the ability for Vela to integrate with HashiCorp Vault as a secret backend.
Package vault provides the ability for Vela to integrate with HashiCorp Vault as a secret backend.

Jump to

Keyboard shortcuts

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