secretsclient

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccountExists = fmt.Errorf("account already exists")

ErrAccountExists occurs account creation when an account already exists

View Source
var ErrNoAuthorizedPublicKeys = fmt.Errorf("no authorized public keys found")

ErrNoAuthorizedPublicKeys occurs when no authorized public keys are found

View Source
var ErrUnauthorized = fmt.Errorf("unauthorized")

ErrUnauthorized occurs when a user is unauthorized to access a resource

Functions

This section is empty.

Types

type Client

type Client interface {
	RegisterEmail(email string) error
	CreateAccount(email, verificationToken, password, publicKey string) error
	Get(path string) ([]byte, error)
	Remove(path string) error
	Set(path string, data []byte) error
	List(path string) ([]string, error)
	GetPublicKeys() ([]*agent.Key, error)
	CreateOrg(org string) error
	Invite(org, user string, write bool) error
	ListOrgs() ([]*OrgDetail, error)
	ListOrgPermissions(path string) ([]*OrgPermissions, error)
	RevokePermission(path, user string) error
}

Client provides a client to the shared secrets service

func NewClient

func NewClient(secretServer, agentSockPath, sshKey string, warnFunc func(string, ...interface{})) Client

NewClient provides a new client

type OrgDetail added in v0.3.11

type OrgDetail struct {
	Name  string
	Admin bool
}

OrgDetail contains an organization and details

type OrgPermissions added in v0.3.11

type OrgPermissions struct {
	User  string
	Path  string
	Write bool
}

OrgPermissions contains permission details within an org

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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