Documentation ¶
Index ¶
- Variables
- func EncryptSecret(secret string) (map[string]interface{}, error)
- func New(key string) (*doppler, error)
- func NewFromEnv() (*doppler, error)
- type ActivityLog
- type ActivityLogs
- type AddProjectMemberParam
- type Config
- type ConfigLog
- type ConfigLogDiff
- type ConfigLogs
- type Configs
- type CreateConfigParams
- type CreateProjectParams
- type CreateRoleParams
- type CreateTokenParams
- type DefaultProjectRole
- type DeletConfigParams
- type DeleteTokenParams
- type Diff
- type DopplerError
- type DownloadSecretParams
- type EncryptedSecretArgs
- type Environment
- type EnvironmentBodyParams
- type Environments
- type FailedRequest
- type Group
- type GroupBodyParams
- type GroupData
- type Groups
- type IConfig
- type IConfigLog
- type IEnvironment
- type IP
- type IProject
- type IPs
- type Integration
- type IntegrationData
- type Integrations
- type Invite
- type Invites
- type IssueLeaseArgs
- type ListSecretNamesParams
- type ListSecretsParams
- type Log
- type Member
- type MemberBodyParams
- type MemberType
- type ModifyConfigParams
- type NoteResponse
- type PlainTextArgs
- type PlainTextResp
- type Project
- type ProjectMemberResp
- type ProjectMembersResp
- type ProjectPermissions
- type ProjectRole
- type ProjectRoles
- type Projects
- type RetrieveProjectResponse
- type RetrieveWorkplaceResponse
- type RevokeLeaseArgs
- type RevokeLeaseData
- type RevokeTokenParam
- type Role
- type RollbackConfigLogParams
- type Secret
- type SecretNames
- type SecretValue
- type Secrets
- type ServiceAccount
- type ServiceAccountBodyParams
- type ServiceAccountModel
- type ServiceAccounts
- type ServiceToken
- type ServiceTokenModel
- type ServiceTokens
- type SetNoteParams
- type Success
- type Sync
- type SyncBodyParams
- type SyncData
- type SyncQueryParams
- type UpdateIntegrationParams
- type UpdateProjectMemberParams
- type UpdateProjectParams
- type UpdateSecretParams
- type User
- type WUser
- type Workplace
- type WorkplaceClass
- type WorkplaceParams
- type WorkplacePermissions
- type WorkplaceRole
- type WorkplaceRoleObject
- type WorkplaceRoles
- type WorkplaceUser
- type WorkplaceUserResp
- type WorkplaceUsers
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidToken = errors.New("received invalid token")
)
View Source
var ( TokenFormats = map[string]*regexp.Regexp{ "service": regexp.MustCompile(`dp\.st\.(?:[a-z0-9\-_]{2,35}\.)?[a-zA-Z0-9]{40,44}`), "cli": regexp.MustCompile(`dp\.ct\.[a-zA-Z0-9]{40,44}`), "personal": regexp.MustCompile(`dp\.pt\.[a-zA-Z0-9]{40,44}`), "service_access": regexp.MustCompile(`dp\.sa\.[a-zA-Z0-9]{40,44}`), "scim": regexp.MustCompile(`dp\.scim\.[a-zA-Z0-9]{40,44}`), "audit": regexp.MustCompile(`dp\.audit\.[a-zA-Z0-9]{40,44}`), } )
Functions ¶
func EncryptSecret ¶
Go implementation of the Encryption Example here: https://docs.doppler.com/reference/share-secret-encrypted
func NewFromEnv ¶
func NewFromEnv() (*doppler, error)
Types ¶
type ActivityLog ¶
type ActivityLogs ¶
type AddProjectMemberParam ¶
type Config ¶
type Config struct { Name string `json:"name"` // Name of the config. Project string `json:"project"` // Identifier of the project that the config belongs to. Environment string `json:"environment"` // Identifier of the environment that the config belongs to. CreatedAt string `json:"created_at"` // Date and time of the object's creation. InitialFetchAt string `json:"initial_fetch_at"` // Date and time of the first secrets fetch. LastFetchAt string `json:"last_fetch_at"` // Date and time of the last secrets fetch. Root bool `json:"root"` // Whether the config is the root of the environment. Locked bool `json:"locked"` // Whether the config can be renamed and/or deleted. Slug string `json:"slug"` }
type ConfigLog ¶
type ConfigLog struct { ID string `json:"id"` // Unique identifier for the object Text string `json:"text"` // Text describing the event HTML string `json:"html"` // HTML describing the event Diff []ConfigLogDiff `json:"diff,omitempty"` Rollback bool `json:"rollback"` // Is this config log a rollback of a previous log User User `json:"user"` Project string `json:"project"` // Unique identifier for the object Environment string `json:"environment"` // Unique identifier for the enironment object Config string `json:"config"` // The config's name CreatedAt string `json:"created_at"` // Date and time of the object's creation }
type ConfigLogDiff ¶
type ConfigLogs ¶
type CreateConfigParams ¶
type CreateProjectParams ¶
type CreateRoleParams ¶
type CreateTokenParams ¶
type CreateTokenParams struct { Project string `json:"project,omitempty"` // Unique identifier for the project object. Config string `json:"config,omitempty"` // Name of the config object. Name string `json:"name,omitempty"` // Name of the service token. ExpireAt string `json:"expire_at,omitempty"` // Unix timestamp of when token should expire. Access string `json:"access,omitempty"` // Token's capabilities. "read/write" or "read". Default: read }
type DefaultProjectRole ¶
type DefaultProjectRole struct {
Identifier string `json:"identifier,omitempty"`
}
type DeletConfigParams ¶
type DeleteTokenParams ¶
type DopplerError ¶
func (*DopplerError) Error ¶
func (err *DopplerError) Error() string
type DownloadSecretParams ¶
type DownloadSecretParams struct { Project string Config string Format string // Acceptable values: json, env, yaml, docker, env-no-quotes, dotnet-json. defaults json NameTransformer string // Acceptable values: camel, upper-camel, lower-snake, tf-var, dotnet, dotnet-env, lower-kebab. defaults to upper snake case IncludeDynamicSecrets bool DynamicSecretsTTLSec int }
type EncryptedSecretArgs ¶
type Environment ¶
type Environment struct { ID string `json:"id"` // An identifier for the object Name string `json:"name"` // Name of the environment Project string `json:"project"` // Identifier of the project the environment belongs to CreatedAt string `json:"created_at"` // Date and time of the object's creation InitialFetchAt string `json:"initial_fetch_at"` // Date and time of the first secrets fetch from a config in the environment }
type EnvironmentBodyParams ¶
type Environments ¶
type Environments struct { Environments []Environment `json:"environments"` Page int `json:"page"` Success bool `json:"success"` }
type FailedRequest ¶
failed response
type Group ¶
type Group struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` CreatedAt string `json:"created_at,omitempty"` DefaultProjectRole DefaultProjectRole `json:"default_project_role,omitempty"` }
type GroupBodyParams ¶
type IConfigLog ¶
type IEnvironment ¶
type IEnvironment struct { Environment Environment `json:"environment"` Success bool `json:"success,omitempty"` }
type Integration ¶
type IntegrationData ¶
type IntegrationData struct { Integration Integration `json:"integration,omitempty"` Success bool `json:"success,omitempty"` }
type Integrations ¶
type Integrations struct { Integrations []Integration `json:"integrations,omitempty"` Success bool `json:"success,omitempty"` }
type Invite ¶
type Invite struct { Slug string `json:"slug"` Email string `json:"email"` CreatedAt string `json:"created_at"` WorkplaceRole WorkplaceRole `json:"workplace_role"` }
type IssueLeaseArgs ¶
type ListSecretNamesParams ¶
type ListSecretNamesParams struct { Project string // Unique identifier for the project object. Config string // Name of the config object. IncludeDynamicSecrets bool // Whether or not to issue leases and include dynamic secret values for the config IncludeManagedSecrets bool // Whether to include Doppler's auto-generated (managed) secrets. defaults to false }
type ListSecretsParams ¶
type ListSecretsParams struct { Project string // Unique identifier for the project object. Config string // Name of the config object. IncludeDynamicSecrets bool // Whether or not to issue leases and include dynamic secret values for the config DynamicSecretsTTLSec int // The number of seconds until dynamic leases expire. Must be used with IncludeDynamicSecrets. Defaults to 1800 (30 minutes). Secrets string // A comma-separated list of secrets to include in the response, may only contain uppercase letters, numbers, and underscores. IncludeManagedSecrets bool // Whether to include Doppler's auto-generated (managed) secrets. defaults to false }
type Log ¶
type Log struct { ID string `json:"id"` // Unique identifier for the object. Text string `json:"text"` // Text describing the event. HTML string `json:"html"` // HTML describing the event. CreatedAt string `json:"created_at"` // Date and time of the object's creation. EnclaveConfig *string `json:"enclave_config"` // The config's name. EnclaveEnvironment *string `json:"enclave_environment"` // Unique identifier for the environment object. EnclaveProject *string `json:"enclave_project"` // Unique identifier for the project object. User User `json:"user"` Diff *Diff `json:"diff"` }
type MemberBodyParams ¶
type MemberType ¶
type MemberType int
const ( MemberWorkplaceUser MemberType = iota MemberGroup MemberInvite MemberServiceAccount )
func (MemberType) String ¶
func (m MemberType) String() string
type ModifyConfigParams ¶
type ModifyConfigParams struct { Project string `json:"project"` // Unique identifier for the project (project name) Config string `json:"config"` // Name of the config object Name string `json:"name"` // The new name of config }
ModifyConfigParams is used for update and clone params
type NoteResponse ¶
type PlainTextArgs ¶
type PlainTextResp ¶
type ProjectMemberResp ¶
type ProjectMembersResp ¶
type ProjectPermissions ¶
type ProjectRole ¶
type ProjectRoles ¶
type ProjectRoles struct { ProjectRoles []ProjectRole `json:"roles,omitempty"` Success bool `json:"success,omitempty"` }
type RetrieveProjectResponse ¶
type RetrieveProjectResponse struct { Role ProjectRole `json:"role"` Success bool `json:"success"` }
type RetrieveWorkplaceResponse ¶
type RetrieveWorkplaceResponse struct { Role ProjectRole `json:"role"` Success bool `json:"success"` }
type RevokeLeaseArgs ¶
type RevokeLeaseData ¶
type RevokeLeaseData struct {
Success bool `json:"success"`
}
type RevokeTokenParam ¶
type RevokeTokenParam struct {
Token string `json:"token,omitempty"`
}
type RollbackConfigLogParams ¶
type Secret ¶
type Secret struct { Name string `json:"name"` Value SecretValue `json:"value"` Success bool `json:"success"` }
type SecretNames ¶
type SecretValue ¶
type ServiceAccount ¶
type ServiceAccount struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` CreatedAt string `json:"created_at,omitempty"` WorkplaceRole WorkplaceRole `json:"workplace_role,omitempty"` }
type ServiceAccountBodyParams ¶
type ServiceAccountBodyParams struct { Name string `json:"name,omitempty"` WorkplaceRole WorkplaceRoleObject `json:"workplace_role,omitempty"` // You may provide an identifier OR permissions, but not both }
type ServiceAccountModel ¶
type ServiceAccountModel struct { ServiceAccount ServiceAccount `json:"service_account,omitempty"` Success bool `json:"success,omitempty"` }
type ServiceAccounts ¶
type ServiceAccounts struct { ServiceAccounts []ServiceAccount `json:"service_accounts,omitempty"` Success bool `json:"success,omitempty"` }
type ServiceToken ¶
type ServiceToken struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` Access string `json:"access,omitempty"` CreatedAt string `json:"created_at,omitempty"` Key string `json:"key,omitempty"` Project string `json:"project,omitempty"` Environment string `json:"environment,omitempty"` Config string `json:"config,omitempty"` ExpiresAt string `json:"expires_at,omitempty"` LastSeenAt string `json:"last_seen_at,omitempty"` TokenPreview string `json:"token_preview,omitempty"` }
type ServiceTokenModel ¶
type ServiceTokenModel struct { Token ServiceToken `json:"token,omitempty"` Success bool `json:"success,omitempty"` }
type ServiceTokens ¶
type ServiceTokens struct { Tokens []ServiceToken `json:"tokens,omitempty"` Success bool `json:"success,omitempty"` }
type SetNoteParams ¶
type SyncBodyParams ¶
type SyncQueryParams ¶
type UpdateIntegrationParams ¶
type UpdateProjectParams ¶
type UpdateSecretParams ¶
type WUser ¶
type WUser struct { Email string `json:"email"` Name string `json:"name"` Username string `json:"username"` ProfileImageURL string `json:"profile_image_url"` MfaEnabled bool `json:"mfa_enabled"` ThirdpartySsoEnabled bool `json:"thirdparty_sso_enabled"` SamlSsoEnabled bool `json:"saml_sso_enabled"` }
type Workplace ¶
type Workplace struct { Workplace WorkplaceClass `json:"workplace"` Success bool `json:"success"` }
type WorkplaceClass ¶
type WorkplaceParams ¶
type WorkplacePermissions ¶
type WorkplaceRole ¶
type WorkplaceRole struct { Name string `json:"name,omitempty"` Permissions []string `json:"permissions,omitempty"` Identifier string `json:"identifier,omitempty"` CreatedAt string `json:"created_at,omitempty"` IsCustomRole bool `json:"is_custom_role,omitempty"` IsInlineRole bool `json:"is_inline_role,omitempty"` }
type WorkplaceRoleObject ¶
type WorkplaceRoles ¶
type WorkplaceRoles struct { WorkplaceRoles []WorkplaceRole `json:"roles,omitempty"` Success bool `json:"success,omitempty"` }
type WorkplaceUser ¶
type WorkplaceUserResp ¶
type WorkplaceUserResp struct { WorkplaceUser WorkplaceUser `json:"workplace_user"` Success bool `json:"success"` }
type WorkplaceUsers ¶
type WorkplaceUsers struct { WorkplaceUsers []WorkplaceUser `json:"workplace_users"` Page int64 `json:"page"` Success bool `json:"success"` }
Source Files ¶
- audit.go
- config_logs.go
- configs.go
- doppler.go
- dynamic_secrets.go
- environments.go
- error.go
- groups.go
- integrations.go
- invites.go
- logs.go
- project_members.go
- project_roles.go
- projects.go
- secrets.go
- secrets_sync.go
- service_accounts.go
- service_tokens.go
- share.go
- token.go
- trustedips.go
- workplace.go
- workplace_roles.go
Click to show internal directories.
Click to hide internal directories.