Documentation ¶
Overview ¶
Package secret is a generated protocol buffer package.
It is generated from these files:
secret/secret.proto secret/password.proto secret/openpgpkey.proto
It has these top-level messages:
Envelope
Index ¶
- Variables
- func Marshal(sec Secret) ([]byte, error)
- type Envelope
- func (m *Envelope) GetOpenPGPKey() *OpenPGPKey
- func (m *Envelope) GetPassword() *Password
- func (this *Envelope) GetValue() interface{}
- func (m *Envelope) Marshal() (data []byte, err error)
- func (m *Envelope) MarshalTo(data []byte) (int, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (e *Envelope) Secret() (Secret, error)
- func (this *Envelope) SetValue(value interface{}) bool
- func (m *Envelope) Size() (n int)
- func (m *Envelope) String() string
- func (m *Envelope) Unmarshal(data []byte) error
- type OpenPGPKey
- func (s *OpenPGPKey) Comment() string
- func (s *OpenPGPKey) Load(r io.Reader) ([][]byte, error)
- func (m *OpenPGPKey) Marshal() (data []byte, err error)
- func (m *OpenPGPKey) MarshalTo(data []byte) (int, error)
- func (s *OpenPGPKey) Phase() Phase
- func (*OpenPGPKey) ProtoMessage()
- func (m *OpenPGPKey) Reset()
- func (m *OpenPGPKey) Size() (n int)
- func (m *OpenPGPKey) String() string
- func (m *OpenPGPKey) Unmarshal(data []byte) error
- type Password
- func (s *Password) Comment() string
- func (*Password) Load(r io.Reader) ([][]byte, error)
- func (m *Password) Marshal() (data []byte, err error)
- func (m *Password) MarshalTo(data []byte) (int, error)
- func (s *Password) Phase() Phase
- func (*Password) ProtoMessage()
- func (m *Password) Reset()
- func (m *Password) Size() (n int)
- func (m *Password) String() string
- func (m *Password) Unmarshal(data []byte) error
- type Phase
- type Secret
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidLengthOpenpgpkey = fmt.Errorf("proto: negative length found during unmarshaling")
)
View Source
var (
ErrInvalidLengthPassword = fmt.Errorf("proto: negative length found during unmarshaling")
)
View Source
var (
ErrInvalidLengthSecret = fmt.Errorf("proto: negative length found during unmarshaling")
)
Functions ¶
Types ¶
type Envelope ¶
type Envelope struct { Password *Password `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"` OpenPGPKey *OpenPGPKey `protobuf:"bytes,2,opt,name=openpgpkey" json:"openpgpkey,omitempty"` }
func (*Envelope) GetOpenPGPKey ¶
func (m *Envelope) GetOpenPGPKey() *OpenPGPKey
func (*Envelope) GetPassword ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
type OpenPGPKey ¶
type OpenPGPKey struct { KeyIDs []uint64 `protobuf:"varint,2,rep,name=key_ids" json:"key_ids,omitempty"` // contains filtered or unexported fields }
func NewOpenPGPKey ¶
func NewOpenPGPKey(keyIDs []uint64, comment string) *OpenPGPKey
NewOpenPGPKey constructs a OpenPGPKey secret for one or more encryption key ids.
func (*OpenPGPKey) Load ¶
func (s *OpenPGPKey) Load(r io.Reader) ([][]byte, error)
Load reads the input data and returns one or more serialized OpenPGP encryption keys for the key ids.
func (*OpenPGPKey) Marshal ¶
func (m *OpenPGPKey) Marshal() (data []byte, err error)
func (*OpenPGPKey) ProtoMessage ¶
func (*OpenPGPKey) ProtoMessage()
func (*OpenPGPKey) Reset ¶
func (m *OpenPGPKey) Reset()
func (*OpenPGPKey) Size ¶
func (m *OpenPGPKey) Size() (n int)
func (*OpenPGPKey) String ¶
func (m *OpenPGPKey) String() string
func (*OpenPGPKey) Unmarshal ¶
func (m *OpenPGPKey) Unmarshal(data []byte) error
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
func NewPassword ¶
NewPassword constructs a Password secret.
func (*Password) ProtoMessage ¶
func (*Password) ProtoMessage()
type Secret ¶
type Secret interface { // Optional description of the secret usage. Comment() string // Marker for the point at which the secret input is required. Phase() Phase // Load the secret data from the Reader and return the internal form. Load(r io.Reader) ([][]byte, error) // Marshal returns the binary representation of the Secret. Marshal() (data []byte, err error) // Unmarshal parses the Secret encoded in data. Unmarshal(data []byte) error }
Secret represents an input secret of a certain medium e.g. an RSA private key or a password.
Click to show internal directories.
Click to hide internal directories.