Documentation
¶
Index ¶
- Constants
- type AccessGrantRecord
- type AccessRequest
- type AccessRequestFile
- type AccessRequestReview
- type DeviceRecord
- type DeviceRevocation
- type DiffEntry
- type DiffSummary
- type EncryptedPayload
- type EnvDiff
- type EnvelopeJSON
- type Environment
- type EnvironmentKeyMetadataRecord
- type EnvironmentKeyRecord
- type EnvironmentPolicy
- type Event
- type KeyAnnotationValue
- type KeyAnnotations
- type LegacyValueRecord
- type LocalIdentityRecord
- type LocalKeyRecord
- type Policy
- type ProjectManifest
- type PublicKeyRecord
- type SecretAAD
- type SecretBody
- type SuppressionRecord
- type ValueChangeContext
- type ValueRecord
- type Variable
Constants ¶
View Source
const ( ProjectSchema = "ghostable.project.v1" DeviceSchema = "ghostable.device.v1" AccessRequestSchema = "ghostable.access-request.v1" EnvironmentKeySchema = "ghostable.environment-key.v1" KeyMetadataSchema = "ghostable.environment-key-metadata.v1" AccessGrantSchema = "ghostable.access-grant.v1" SuppressionSchema = "ghostable.suppression.v1" PolicySchema = "ghostable.policy.v1" ValueSchema = "ghostable.value.v1" LegacyValueSchema = "ghostable.value.go.v1" EventSchema = "ghostable.event.v1" LocalKeySchema = "ghostable.local-key.go.v1" LocalIdentitySchema = "ghostable.local-identity.go.v1" DefaultEnvName = "default" DefaultEnvType = "local" DefaultActivity = "minimal" DefaultDeviceName = "Local device" GhostableOrgScope = "ghostable" KeyStatusActive = "active" KeyStatusCommented = "commented" KeyAnnotationString = "string" KeyAnnotationNumber = "number" KeyAnnotationBool = "bool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessGrantRecord ¶
type AccessGrantRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Environment string `json:"environment"`
DeviceID string `json:"deviceId"`
GrantedByDeviceID string `json:"grantedByDeviceId"`
GrantedAt string `json:"grantedAt"`
EnvKeyVersion int `json:"envKeyVersion"`
EnvKeyFingerprint string `json:"envKeyFingerprint"`
Envelope EnvelopeJSON `json:"envelope"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type AccessRequest ¶
type AccessRequest struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
ID string `json:"id"`
DeviceID string `json:"deviceId"`
Environment string `json:"environment"`
Role string `json:"role"`
Reason string `json:"reason,omitempty"`
CreatedAt string `json:"createdAt"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type AccessRequestFile ¶
type AccessRequestFile struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Request AccessRequest `json:"request"`
Review *AccessRequestReview `json:"review,omitempty"`
}
type AccessRequestReview ¶
type AccessRequestReview struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
RequestID string `json:"requestId"`
Status string `json:"status"`
ReviewedByDeviceID string `json:"reviewedByDeviceId"`
ReviewedAt string `json:"reviewedAt"`
Reason string `json:"reason,omitempty"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type DeviceRecord ¶
type DeviceRecord struct {
Schema string `json:"schema"`
ID string `json:"id"`
Name string `json:"name,omitempty"`
Platform string `json:"platform,omitempty"`
Status string `json:"status"`
CreatedAt string `json:"createdAt"`
SigningKey PublicKeyRecord `json:"signingKey"`
EncryptionKey PublicKeyRecord `json:"encryptionKey"`
DeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type DeviceRevocation ¶
type DiffSummary ¶
type EncryptedPayload ¶
type EnvDiff ¶
type EnvDiff struct {
Environment string `json:"environment"`
SourceEnvironment string `json:"sourceEnvironment,omitempty"`
TargetEnvironment string `json:"targetEnvironment,omitempty"`
File string `json:"file"`
Added []DiffEntry `json:"added"`
Changed []DiffEntry `json:"changed"`
Removed []DiffEntry `json:"removed"`
Unchanged []string `json:"unchanged"`
Summary DiffSummary `json:"summary"`
}
type EnvelopeJSON ¶
type EnvelopeJSON struct {
ID string `json:"id"`
Version string `json:"version"`
Alg string `json:"alg,omitempty"`
ToDevicePublicKey string `json:"to_device_public_key"`
FromEphemeralPublicKey string `json:"from_ephemeral_public_key"`
NonceB64 string `json:"nonce_b64"`
CiphertextB64 string `json:"ciphertext_b64"`
CreatedAt string `json:"created_at"`
Meta map[string]string `json:"meta,omitempty"`
AADB64 string `json:"aad_b64,omitempty"`
SenderKID string `json:"sender_kid,omitempty"`
SignatureB64 string `json:"signature_b64,omitempty"`
}
type Environment ¶
type EnvironmentKeyMetadataRecord ¶
type EnvironmentKeyMetadataRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Environment string `json:"environment"`
Key string `json:"key"`
Status string `json:"status"`
Position int64 `json:"position,omitempty"`
Annotations KeyAnnotations `json:"annotations,omitempty"`
EncryptedNote *EncryptedPayload `json:"encryptedNote,omitempty"`
CreatedByDeviceID string `json:"createdByDeviceId,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedByDeviceID string `json:"updatedByDeviceId,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type EnvironmentKeyRecord ¶
type EnvironmentKeyRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Environment string `json:"environment"`
Version int `json:"version"`
Fingerprint string `json:"fingerprint"`
EncryptedKey EncryptedPayload `json:"encryptedKey"`
CreatedByDeviceID string `json:"createdByDeviceId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type EnvironmentPolicy ¶
type Event ¶
type Event struct {
Schema string `json:"schema"`
Action string `json:"action"`
ProjectID string `json:"projectId"`
Environment string `json:"environment,omitempty"`
Key string `json:"key,omitempty"`
DeviceID string `json:"deviceId,omitempty"`
GitHead string `json:"gitHead,omitempty"`
OccurredAt string `json:"occurredAt"`
Details map[string]interface{} `json:"details,omitempty"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type KeyAnnotationValue ¶
type KeyAnnotations ¶
type KeyAnnotations map[string]KeyAnnotationValue
type LegacyValueRecord ¶
type LegacyValueRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Environment string `json:"environment"`
Key string `json:"key"`
KeyHash string `json:"keyHash"`
EncryptedValue EncryptedPayload `json:"encryptedValue"`
EncryptedNote *EncryptedPayload `json:"encryptedNote,omitempty"`
Sensitive bool `json:"sensitive"`
Version int `json:"version"`
CreatedByDeviceID string `json:"createdByDeviceId"`
UpdatedByDeviceID string `json:"updatedByDeviceId"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type LocalIdentityRecord ¶
type LocalIdentityRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
DeviceID string `json:"deviceId"`
Name string `json:"name,omitempty"`
Platform string `json:"platform,omitempty"`
CreatedAt string `json:"createdAt"`
SigningPublicKeyB64 string `json:"signingPublicKeyB64"`
SigningPrivateKeyB64 string `json:"signingPrivateKeyB64"`
EncryptionPublicKeyB64 string `json:"encryptionPublicKeyB64"`
EncryptionPrivateKeyB64 string `json:"encryptionPrivateKeyB64"`
TrustedPolicySigners []string `json:"trustedPolicySigners,omitempty"`
TrustedPolicyVersion int `json:"trustedPolicyVersion,omitempty"`
}
type LocalKeyRecord ¶
type Policy ¶
type Policy struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Version int `json:"version"`
UpdatedAt string `json:"updatedAt"`
Owners []string `json:"owners"`
Environments map[string]EnvironmentPolicy `json:"environments"`
Revoked map[string]DeviceRevocation `json:"revoked,omitempty"`
DeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type ProjectManifest ¶
type PublicKeyRecord ¶
type SecretBody ¶
type SecretBody struct {
Name string `json:"name"`
Env string `json:"env"`
Ciphertext string `json:"ciphertext"`
Nonce string `json:"nonce"`
Alg string `json:"alg"`
AAD SecretAAD `json:"aad"`
Claims map[string]string `json:"claims"`
IfVersion *int `json:"if_version,omitempty"`
EnvKekVersion int `json:"env_kek_version,omitempty"`
EnvKekFingerprint string `json:"env_kek_fingerprint,omitempty"`
LineBytes int `json:"line_bytes,omitempty"`
Change *ValueChangeContext `json:"change,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type SuppressionRecord ¶
type SuppressionRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
ID string `json:"id"`
Source string `json:"source,omitempty"`
Code string `json:"code"`
Environment string `json:"environment,omitempty"`
Key string `json:"key,omitempty"`
Path string `json:"path,omitempty"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
Kind string `json:"kind,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
Reason string `json:"reason,omitempty"`
CreatedByDeviceID string `json:"createdByDeviceId"`
CreatedAt string `json:"createdAt"`
ExpiresAt string `json:"expiresAt,omitempty"`
SignerDeviceID string `json:"device_id,omitempty"`
ClientSig string `json:"client_sig,omitempty"`
}
type ValueChangeContext ¶
type ValueChangeContext struct {
Reason string `json:"reason,omitempty"`
}
type ValueRecord ¶
type ValueRecord struct {
Schema string `json:"schema"`
ProjectID string `json:"projectId"`
Environment string `json:"environment"`
Key string `json:"key"`
Version int `json:"version"`
UpdatedAt string `json:"updatedAt"`
UpdatedByDeviceID string `json:"updatedByDeviceId"`
Secret SecretBody `json:"secret"`
KeyHash string `json:"keyHash,omitempty"`
EncryptedValue EncryptedPayload `json:"encryptedValue,omitempty"`
EncryptedNote *EncryptedPayload `json:"encryptedNote,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
CreatedByDeviceID string `json:"createdByDeviceId,omitempty"`
CreatedAtLegacy time.Time `json:"createdAt,omitempty"`
UpdatedAtLegacy time.Time `json:"-"`
}
type Variable ¶
type Variable struct {
Key string `json:"key"`
Value string `json:"value,omitempty"`
HasValue bool `json:"hasValue"`
ValueOmitted bool `json:"valueOmitted,omitempty"`
Sensitive bool `json:"sensitive"`
Commented bool `json:"commented,omitempty"`
Note string `json:"note,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Annotations KeyAnnotations `json:"annotations,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.