Documentation
¶
Index ¶
- func Decrypt(source client.Source, sink client.Sink, interactive bool, force bool) error
- func Encrypt(source client.Source, sink client.Sink, members []string) error
- func GetMemberListIdentifiers(members []*Member) (identifiers []string)
- func RemoveScope(name string) (err error)
- type BufferSink
- type BufferSource
- type ExporterEnv
- type ExporterHuman
- type ExporterJSON
- type ExporterYAML
- type Formatter
- type GlobalContext
- type ImportOptions
- type Importer
- type ImporterJSON
- type ImporterYAML
- type Member
- type SaltpackUI
- type Scope
- func (s *Scope) AddMembers(members []*Member, adder *Member) []*Member
- func (s *Scope) Del(key string)
- func (s *Scope) Exists() bool
- func (s *Scope) Export(format string) (string, error)
- func (s *Scope) Get(key string) string
- func (s *Scope) Import(contents string, options ImportOptions) error
- func (s *Scope) KeybaseSinkPath() string
- func (s *Scope) Load() error
- func (s *Scope) MemberExists(identifier string) bool
- func (s *Scope) MemberPointers() (members []*Member)
- func (s *Scope) Path() string
- func (s *Scope) RemoveMembersByIdentifiers(members []string) []*Member
- func (s *Scope) Save() error
- func (s *Scope) Set(key string, value string)
- func (s *Scope) ToJSON() ([]byte, error)
- type StreamFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt encrypts data from the source stream to the sink stream for the list of provided members
Types ¶
type BufferSink ¶
type BufferSink struct {
// contains filtered or unexported fields
}
BufferSink is used to capture Keybase decrypted data
func (*BufferSink) Bytes ¶
func (s *BufferSink) Bytes() []byte
Bytes returns the bytes in the buffer
func (*BufferSink) Close ¶
func (s *BufferSink) Close() error
Close is a stub to fit the Sink interface
func (*BufferSink) HitError ¶
func (s *BufferSink) HitError(e error) error
HitError is a stub to fit the Sink interface
func (*BufferSink) Open ¶
func (s *BufferSink) Open() error
Open is a stub to fit the Sink interface
func (*BufferSink) String ¶
func (s *BufferSink) String() string
String returns the buffer as a string
type BufferSource ¶
type BufferSource struct {
// contains filtered or unexported fields
}
func NewBufferSource ¶
func NewBufferSource(b *[]byte) *BufferSource
func (*BufferSource) Close ¶
func (b *BufferSource) Close() error
Close is a stub to fit the Source interface
func (*BufferSource) CloseWithError ¶
func (b *BufferSource) CloseWithError(error) error
CloseWithError is a stub to fit the Source interface
func (*BufferSource) Open ¶
func (b *BufferSource) Open() error
Open is a stub to fit the Source interface
type ExporterEnv ¶
type ExporterEnv struct {
// contains filtered or unexported fields
}
ExporterEnv formats data for environment variable
func NewExporterEnv ¶
func NewExporterEnv(data *map[string]string) *ExporterEnv
NewExporterHuman instantiate a json formater
type ExporterHuman ¶
type ExporterHuman struct {
// contains filtered or unexported fields
}
ExporterHuman formats data for human consumption
func NewExporterHuman ¶
func NewExporterHuman(data *map[string]string) *ExporterHuman
NewExporterHuman instantiate a json formater
func (*ExporterHuman) String ¶
func (f *ExporterHuman) String() string
String exports the data for humans
type ExporterJSON ¶
type ExporterJSON struct {
// contains filtered or unexported fields
}
ExporterJSON formats data as json
func NewExporterJSON ¶
func NewExporterJSON(data *map[string]string) *ExporterJSON
NewExporterJSON instantiate a json formater
func (*ExporterJSON) String ¶
func (f *ExporterJSON) String() string
String exports the scope data in json format
type ExporterYAML ¶
type ExporterYAML struct {
// contains filtered or unexported fields
}
ExporterYAML formats data as yaml
func NewExporterYAML ¶
func NewExporterYAML(data *map[string]string) *ExporterYAML
NewExporterYAML instantiate a yaml formater
func (*ExporterYAML) String ¶
func (f *ExporterYAML) String() string
String exports the scope data in yaml format
type GlobalContext ¶
GlobalContext stores the application global context
var G *GlobalContext
G is the current global context
func NewGlobalContext ¶
func NewGlobalContext() *GlobalContext
NewGlobalContext initializes a new global context
func (*GlobalContext) CurrentUser ¶
func (g *GlobalContext) CurrentUser() (*keybase1.User, error)
CurrentUser Get the current Keybase User
func (*GlobalContext) Dir ¶
func (g *GlobalContext) Dir() string
Dir returns the directory where the secrets should be stored
func (*GlobalContext) DirExists ¶
func (g *GlobalContext) DirExists() bool
DirExists does the secret directory exist?
func (*GlobalContext) LogError ¶
func (g *GlobalContext) LogError(err error)
type ImportOptions ¶
type ImportOptions struct { Format string // contains filtered or unexported fields }
ImportOptions is a set of options for importing secrets
type ImporterJSON ¶
type ImporterJSON struct {
Options ImportOptions
}
ParserJSON parse's data from json
func NewImporterJSON ¶
func NewImporterJSON(options ImportOptions) *ImporterJSON
type ImporterYAML ¶
type ImporterYAML struct {
Options ImportOptions
}
ParserJSON parse's data from json
func NewImporterYAML ¶
func NewImporterYAML(options ImportOptions) *ImporterYAML
type Member ¶
type Member struct { Identifier string Type string KeybaseUid keybase1.UID AddedBy string DateAdded time.Time }
Member is a secret member
func NewKeybaseMember ¶
NewMember instantiate a scope struct
func NewMemberFromKeybaseUser ¶
NewMemberFromKeybaseUser Creates a member from a Keybase User type
type SaltpackUI ¶
type SaltpackUI struct { libkb.Contextified // contains filtered or unexported fields }
func (*SaltpackUI) SaltpackPromptForDecrypt ¶
func (s *SaltpackUI) SaltpackPromptForDecrypt(_ context.Context, arg keybase1.SaltpackPromptForDecryptArg) (err error)
func (*SaltpackUI) SaltpackVerifySuccess ¶
func (s *SaltpackUI) SaltpackVerifySuccess(_ context.Context, arg keybase1.SaltpackVerifySuccessArg) error
type Scope ¶
Scope encapsulates a logical set of secrets
func CreateScope ¶
CreateScope creates a new Scope and saves it to disk.
func NewScope ¶
NewScope instantiates a Scope struct. If the Scope already exists then creation will fail. In that case use `GetScope`.
func (*Scope) AddMembers ¶
AddMembers adds a list of members to the Scope
func (*Scope) Import ¶
func (s *Scope) Import(contents string, options ImportOptions) error
Import adds `contents` to the Scope with the given options
func (*Scope) KeybaseSinkPath ¶
KeybaseSinkPath is the location of the keybase encryption
func (*Scope) MemberExists ¶
MemberExists tests if a member already exists in this scope
func (*Scope) MemberPointers ¶
MemberPointers returns a list with pointers to the members in this scope
func (*Scope) RemoveMembersByIdentifiers ¶
RemoveMembersByIdentifiers removes members from a Scope
type StreamFilter ¶
type StreamFilter struct {
// contains filtered or unexported fields
}
StreamFilter manages the input and output streams.
func NewStreamFilter ¶
func NewStreamFilter(source client.Source, sink client.Sink) *StreamFilter
NewStreamFilter creates a new StreamFilter
func (*StreamFilter) ClientOpen ¶
func (s *StreamFilter) ClientOpen() (snk, src keybase1.Stream, err error)
ClientOpen Connect the input and output streams with the Keybase client