Documentation ¶
Index ¶
- Variables
- func DecryptedTokenFactory() lexmachine.Action
- func EncryptedTokenFactory() lexmachine.Action
- func NonMatchTokenFactory() lexmachine.Action
- func ParseEncryptedValue(v []byte) crypto.Data
- func ReaderBytes(r io.Reader) ([]byte, error)
- type DecryptedToken
- type EncryptedToken
- type NonMatchToken
- type Parser
- type ParserError
- type Token
- type Tokens
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EncryptedPattern = []byte(`ENC\[\w+(,[^\]]+)+\]`) DecryptedPattern = []byte(`DEC(\(\d+\))?::(\w+)\[[^\]]+\]!`) ErrMalformedToken = errors.New("Malformed Token") )
View Source
var ErrDuplicateIndex = errors.New("A duplicate decrypted token was found based on its index identifier")
Functions ¶
func DecryptedTokenFactory ¶
func DecryptedTokenFactory() lexmachine.Action
func EncryptedTokenFactory ¶
func EncryptedTokenFactory() lexmachine.Action
func NonMatchTokenFactory ¶
func NonMatchTokenFactory() lexmachine.Action
func ParseEncryptedValue ¶
Types ¶
type DecryptedToken ¶
type DecryptedToken struct { Index int // contains filtered or unexported fields }
func NewDecryptedToken ¶
func NewDecryptedToken(value crypto.Data, provider string, line, column int) *DecryptedToken
func ParseDecryptedToken ¶
func ParseDecryptedToken(match []byte, line, column int) (*DecryptedToken, error)
func (*DecryptedToken) Column ¶
func (t *DecryptedToken) Column() int
func (*DecryptedToken) Convert ¶
func (t *DecryptedToken) Convert(e crypto.Encrypters) (Token, error)
func (*DecryptedToken) Line ¶
func (t *DecryptedToken) Line() int
func (*DecryptedToken) Provider ¶
func (t *DecryptedToken) Provider() string
func (*DecryptedToken) String ¶
func (t *DecryptedToken) String() string
func (*DecryptedToken) Value ¶
func (t *DecryptedToken) Value() crypto.Data
type EncryptedToken ¶
type EncryptedToken struct {
// contains filtered or unexported fields
}
func NewEncryptedToken ¶
func NewEncryptedToken(value crypto.Data, provider string, line, column int) *EncryptedToken
func ParseEncryptedToken ¶
func ParseEncryptedToken(match []byte, line, column int) (*EncryptedToken, error)
func (*EncryptedToken) Column ¶
func (t *EncryptedToken) Column() int
func (*EncryptedToken) Convert ¶
func (t *EncryptedToken) Convert(e crypto.Encrypters) (Token, error)
func (*EncryptedToken) Line ¶
func (t *EncryptedToken) Line() int
func (*EncryptedToken) Provider ¶
func (t *EncryptedToken) Provider() string
func (*EncryptedToken) String ¶
func (t *EncryptedToken) String() string
func (*EncryptedToken) Value ¶
func (t *EncryptedToken) Value() crypto.Data
type NonMatchToken ¶
type NonMatchToken struct {
// contains filtered or unexported fields
}
func NewNonMatchToken ¶
func NewNonMatchToken(value crypto.Data) *NonMatchToken
func (*NonMatchToken) Column ¶
func (t *NonMatchToken) Column() int
func (*NonMatchToken) Convert ¶
func (t *NonMatchToken) Convert(_ crypto.Encrypters) (Token, error)
func (*NonMatchToken) Line ¶
func (t *NonMatchToken) Line() int
func (*NonMatchToken) Provider ¶
func (t *NonMatchToken) Provider() string
func (*NonMatchToken) String ¶
func (t *NonMatchToken) String() string
func (*NonMatchToken) Value ¶
func (t *NonMatchToken) Value() crypto.Data
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewDecryptionParser ¶
func NewEncryptionParser ¶
type ParserError ¶
func NewFileParserError ¶
func NewFileParserError(err error, line, column int) *ParserError
func NewTokenParserError ¶
func NewTokenParserError(err error, t Token) *ParserError
func (*ParserError) Error ¶
func (e *ParserError) Error() string
func (*ParserError) Unwrap ¶
func (e *ParserError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.