onepassword

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const ConfigType = "1password"

ConfigType is the name of the config type for the 1password secret keeper.

Variables

This section is empty.

Functions

func Builder

func Builder(ctx context.Context, c any) (secrets.Keeper, error)

Builder builds a new 1password secret keeper.

Types

type Config

type Config struct {
	// ConnectHost is the host to connect to the 1password service.
	ConnectHost string `mapstructure:"connect_host" yaml:"connect_host"`

	// ConnectToken is the token to use to connect to the 1password service.
	ConnectToken string `mapstructure:"connect_token" yaml:"connect_token"`
}

Config is the configuration for the 1password secret keeper.

type OnePassword

type OnePassword struct {
	// contains filtered or unexported fields
}

func NewOnePassword

func NewOnePassword(url string, token string) *OnePassword

func NewOnePasswordFromEnvironment

func NewOnePasswordFromEnvironment() (*OnePassword, error)

func (*OnePassword) CopySecret

func (o *OnePassword) CopySecret(
	_ context.Context,
	id string,
	location string,
) (secrets.Secret, error)

func (*OnePassword) DeleteSecret

func (o *OnePassword) DeleteSecret(_ context.Context, id string) error

func (*OnePassword) GetSecret

func (o *OnePassword) GetSecret(_ context.Context, id string) (secrets.Secret, error)

func (*OnePassword) GetSecretsByName

func (o *OnePassword) GetSecretsByName(_ context.Context, name string) ([]secrets.Secret, error)

func (*OnePassword) ListLocations

func (o *OnePassword) ListLocations(_ context.Context) ([]string, error)

func (*OnePassword) ListSecrets

func (o *OnePassword) ListSecrets(_ context.Context, location string) ([]string, error)

func (*OnePassword) MoveSecret

func (o *OnePassword) MoveSecret(_ context.Context, id string, location string) (secrets.Secret, error)

func (*OnePassword) SetSecret

func (o *OnePassword) SetSecret(_ context.Context, secret secrets.Secret) (secrets.Secret, error)

type Single

type Single struct {
	// contains filtered or unexported fields
}

func (*Single) Fields

func (s *Single) Fields() map[string]string

func (*Single) GetField

func (s *Single) GetField(field string) string

func (*Single) ID

func (s *Single) ID() string

func (*Single) LastModified

func (s *Single) LastModified() time.Time

func (*Single) Location

func (s *Single) Location() string

func (*Single) Name

func (s *Single) Name() string

func (*Single) Password

func (s *Single) Password() string

func (*Single) SetField

func (s *Single) SetField(field, value string)

func (*Single) SetFields

func (s *Single) SetFields(fields map[string]string)

func (*Single) SetName

func (s *Single) SetName(name string)

func (*Single) SetPassword

func (s *Single) SetPassword(password string)

func (*Single) SetType

func (s *Single) SetType(typ string)

func (*Single) SetUrl

func (s *Single) SetUrl(nu *url.URL)

func (*Single) SetUsername

func (s *Single) SetUsername(username string)

func (*Single) Type

func (s *Single) Type() string

func (*Single) Url

func (s *Single) Url() *url.URL

func (*Single) Username

func (s *Single) Username() string

Jump to

Keyboard shortcuts

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