parser

package
v0.0.0-...-2e0f108 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecryptedKeyableBlob

type DecryptedKeyableBlob struct {
	Env                  KeyableEnv
	SubEnv               KeyableEnv
	Locals               KeyableEnv
	InheritanceOverrides InheritanceOverrides
}

type DecryptedResponse

type DecryptedResponse struct {
	*DecryptedKeyableBlob
	DecryptedBlocks []*DecryptedKeyableBlob
}

type EnvMap

type EnvMap map[string]string

func (EnvMap) ToJson

func (env EnvMap) ToJson() (string, error)

type FetchResponse

type FetchResponse struct {
	*KeyableBlob
	OrgId                  string                   `json:"orgId"`
	EncryptedPrivkey       *crypto.EncryptedData    `json:"encryptedPrivkey"`
	Pubkey                 *crypto.Pubkey           `json:"pubkey"`
	SignedTrustedRoot      *crypto.SignedData       `json:"signedTrustedRoot"`
	Blocks                 []*KeyableBlob           `json:"blocks,omitempty"`
	RootPubkeyReplacements []*RootPubkeyReplacement `json:"rootPubkeyReplacements,omitempty"`
	V1Payload              *V1EnvServiceResponse    `json:"v1Payload,omitempty"`
}

func (*FetchResponse) Parse

func (response *FetchResponse) Parse(encryptionKey string, forceV2Only bool) (EnvMap, *crypto.Privkey, *crypto.SignedData, []string, bool, error)

type InheritanceOverrides

type InheritanceOverrides map[string]KeyableEnv

type InheritanceOverridesBlobs

type InheritanceOverridesBlobs map[string]KeyableBlobFields

type KeyableBlob

type KeyableBlob struct {
	Env                  *KeyableBlobFields        `json:"env,omitempty"`
	SubEnv               *KeyableBlobFields        `json:"subEnv,omitempty"`
	Locals               *KeyableBlobFields        `json:"locals,omitempty"`
	InheritanceOverrides InheritanceOverridesBlobs `json:"inheritanceOverrides,omitempty"`
}

type KeyableBlobFields

type KeyableBlobFields struct {
	EncryptedEnv          *crypto.EncryptedData `json:"encryptedEnv"`
	EncryptedKey          *crypto.EncryptedData `json:"encryptedKey"`
	EncryptedByPubkeyId   string                `json:"encryptedByPubkeyId"`
	EncryptedByPubkey     *crypto.Pubkey        `json:"encryptedByPubkey"`
	EncryptedByTrustChain *crypto.SignedData    `json:"encryptedByTrustChain"`
}

type KeyableBlobFieldsWithTrustChain

type KeyableBlobFieldsWithTrustChain struct {
	*KeyableBlobFields
	DecryptedPrivkey     *crypto.Privkey
	TrustedKeyablesChain *trust.TrustedKeyablesChain
	Signer               *trust.Signer
}

type KeyableEnv

type KeyableEnv map[string]*KeyableEnvVal

type KeyableEnvVal

type KeyableEnvVal struct {
	Val                   string `json:"val,omitempty"`
	InheritsEnvironmentId string `json:"inheritsEnvironmentId,omitempty"`
	IsUndefined           bool   `json:"isUndefined,omitempty"`
	IsEmpty               bool   `json:"isEmpty,omitempty"`
}

type ResponseWithKeys

type ResponseWithKeys struct {
	RootKeys
	Response *FetchResponse
}

type ResponseWithTrustChains

type ResponseWithTrustChains struct {
	*KeyableBlobWithTrustChains
	BlocksWithTrustChain []*KeyableBlobWithTrustChains
	ResponseWithKeys     *ResponseWithKeys
}

type RootKeys

type RootKeys struct {
	DecryptedPrivkey *crypto.Privkey
	VerifiedPubkey   *crypto.Pubkey
}

type RootPubkeyReplacement

type RootPubkeyReplacement struct {
	Id                        string             `json:"id"`
	ReplacingPubkeyId         string             `json:"replacingPubkeyId"`
	ReplacingPubkey           *crypto.Pubkey     `json:"replacingPubkey"`
	SignedReplacingTrustChain *crypto.SignedData `json:"signedReplacingTrustChain"`
}

type V1EnvServiceResponse

type V1EnvServiceResponse struct {
	EncryptedV2Key         string `json:"encryptedV2Key"`
	EncryptedPrivkey       string `json:"encryptedPrivkey"`
	PubkeyArmored          string `json:"pubkey"`
	SignedTrustedPubkeys   string `json:"signedTrustedPubkeys"`
	SignedById             string `json:"signedById"`
	SignedByPubkeyArmored  string `json:"signedByPubkey"`
	SignedByTrustedPubkeys string `json:"signedByTrustedPubkeys"`
}

func (*V1EnvServiceResponse) LegacyV1Parse

func (response *V1EnvServiceResponse) LegacyV1Parse(pw string) (EnvMap, error)

type V1ResponseWithKeys

type V1ResponseWithKeys struct {
	RawResponse                                                     *V1EnvServiceResponse
	DecryptedPrivkey, VerifiedPubkey, SignerKeyring, SignedByPubkey openpgp.EntityList
}

type V1ResponseWithTrustChain

type V1ResponseWithTrustChain struct {
	ResponseWithKeys     *V1ResponseWithKeys
	TrustedKeyablesChain *trust.V1TrustedKeyablesChain
	Signer               *trust.V1Signer
}

Jump to

Keyboard shortcuts

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