Documentation
¶
Index ¶
- type Payload
- func (p *Payload) Decode() error
- func (p *Payload) Decrypt(key [32]byte) error
- func (p *Payload) Decrypted(key [32]byte) (*Payload, error)
- func (p *Payload) DeleteValue()
- func (p *Payload) Encode()
- func (p *Payload) Encrypt(key [32]byte) error
- func (p *Payload) Encrypted(key [32]byte) (*Payload, error)
- func (p *Payload) GetValue() string
- func (p *Payload) IsEmpty() bool
- func (p *Payload) IsEncoded() bool
- func (p *Payload) IsExposable() bool
- func (p *Payload) MarkDecoded()
- func (p *Payload) MarkEncoded()
- func (p *Payload) MarkExposable()
- func (p *Payload) MarkNotExposable()
- func (p *Payload) Set(value string)
- func (p *Payload) ToMap() (result map[string]interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload struct {
sync.Mutex
Value string `json:"value,omitempty"`
// Allows the value to be synced as an exposable one
// on platforms which differentiate between decryptable and non-decryptable secrets.
// For example, Github and Vercel.
Exposable bool `json:"exposable,omitempty"`
// contains filtered or unexported fields
}
func (*Payload) Decrypted ¶
Decrypts the value of the payload and returns a new deep copy of the payload.
func (*Payload) Encrypted ¶
Encrypts the value of the payload with the supplied key and returns a new deep copy of the payload.
func (*Payload) IsEmpty ¶
Returns boolean indicating whether the value of the payload is empty or not.
func (*Payload) IsExposable ¶
Returns a boolean validating whether a value is exposable or not.
func (*Payload) MarkExposable ¶
func (p *Payload) MarkExposable()
Marks the "exposable" value of the payload as "true."
Exposability allows the value to be synced as an exposable one on platforms which differentiate between decryptable and non-decryptable secrets. For example, Github and Vercel. In Github actions, this value will be synced as a "variable" and NOT a secret, once it is marked "exposable" over here.
func (*Payload) MarkNotExposable ¶
func (p *Payload) MarkNotExposable()
Marks the "exposable" value of the payload as "false."
Read the documentation of "MarkExposable" function.
Click to show internal directories.
Click to hide internal directories.