doppler

package module
v0.0.0-...-2f0eb98 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 18 Imported by: 0

README

Doppler-Go

Go SDK client for doppler.com API.

Installation

  go get -u github.com/dilutedev/doppler

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

DOPPLER_KEY

Read more about keys here

Documentation

API Documentation

Features

  • Auth
  • Workplace
  • Workplace Roles
  • Activity logs
  • Projects
  • Project Roles
  • Project Members
  • Environments
  • Configs
  • Config logs
  • Trusted IPs
  • Secrets
  • Integrations
  • Secrets Sync
  • Dynamic Secrets
  • Service Tokens
  • Invites
  • Groups
  • Service Accounts
  • Audit
  • Share

Usage/Examples

package main

import (
    "github.com/dilutedev/doppler"
    _ "github.com/joho/godotenv/autoload"
)

func main(){
    dp, err := doppler.NewFromEnv()
    if err != nil {
        panic(err)
    }

    projects, err := dp.ListProjects(1, nil)
    if err != nil {
        panic(err)
    }

    log.Println(projects)
}

Authors

Documentation

Index

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

func EncryptSecret(secret string) (map[string]interface{}, error)

Go implementation of the Encryption Example here: https://docs.doppler.com/reference/share-secret-encrypted

Types

type ActivityLog

type ActivityLog struct {
	Log     Log  `json:"log"`
	Success bool `json:"success"`
}

type ActivityLogs

type ActivityLogs struct {
	Page    int   `json:"page"`
	Logs    []Log `json:"logs"`
	Success bool  `json:"success"`
}

type AddProjectMemberParam

type AddProjectMemberParam struct {
	Type         string   `json:"type"`
	Slug         string   `json:"slug"`
	Role         string   `json:"role"`
	Environments []string `json:"environments"`
}

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 ConfigLogDiff struct {
	Name    string `json:"name"`
	Added   string `json:"added"`
	Removed string `json:"removed"`
}

type ConfigLogs

type ConfigLogs struct {
	Logs    []ConfigLog `json:"logs"`
	Page    int         `json:"page"`
	Success bool        `json:"success"`
}

type Configs

type Configs struct {
	Configs []Config `json:"configs"`
	Page    int      `json:"page"`
	Success bool     `json:"success"`
}

type CreateConfigParams

type CreateConfigParams struct {
	Project     string `json:"project"`     // Unique identifier for the project object
	Environment string `json:"environment"` // Identifier for the environment object
	Name        string `json:"name"`        // Name of the new branch config
}

type CreateProjectParams

type CreateProjectParams struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type CreateRoleParams

type CreateRoleParams struct {
	Name        string   `json:"name,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
}

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 DeletConfigParams struct {
	Project string `json:"project"` // Unique identifier for the project (project name)
	Config  string `json:"config"`  // Name of the config object
}

type DeleteTokenParams

type DeleteTokenParams struct {
	Project string `json:"project,omitempty"` // Unique identifier for the project object.
	Config  string `json:"config,omitempty"`  // Name of the config object.
	Slug    string `json:"slug,omitempty"`    // The slug of the service token.
}

type Diff

type Diff struct {
	Name    *string  `json:"name"`
	Added   []string `json:"added"`
	Removed []string `json:"removed"`
	Updated []string `json:"updated"`
}

type Doppler

type Doppler struct {
	// contains filtered or unexported fields
}

func New

func New(key string) (*Doppler, error)

create new doppler config

func NewFromEnv

func NewFromEnv() (*Doppler, error)

func (*Doppler) AddIP

func (dp *Doppler) AddIP(project, config, ip string) (*IP, error)

Add a trusted IP

func (*Doppler) AddMember

func (dp *Doppler) AddMember(slug string, params MemberBodyParams) (string, error)

TODO: docs incomplete

func (*Doppler) AddProjectMember

func (dp *Doppler) AddProjectMember(project_id string, args AddProjectMemberParam) (*Member, error)

Add Project Member

func (*Doppler) CloneConfig

func (dp *Doppler) CloneConfig(params ModifyConfigParams) (*IConfig, error)

Create a new branch config by cloning another. This duplicates a branch config and all its secrets.

func (*Doppler) CreateConfig

func (dp *Doppler) CreateConfig(params CreateConfigParams) (*IConfig, error)

Create a new branch config.

func (*Doppler) CreateEnvironment

func (dp *Doppler) CreateEnvironment(projectName string, params EnvironmentBodyParams) (*IEnvironment, error)

Create Environment

  • projectName: The project's name
  • params: Request Body parameters

func (*Doppler) CreateGroup

func (dp *Doppler) CreateGroup(params GroupBodyParams) (*GroupData, error)

func (*Doppler) CreateIntegration

func (dp *Doppler) CreateIntegration(integrationType, name string) (*IntegrationData, error)

TODO: docs incomplete

func (*Doppler) CreateProject

func (dp *Doppler) CreateProject(params CreateProjectParams) (*IProject, error)

create new project

func (*Doppler) CreateProjectRole

func (dp *Doppler) CreateProjectRole(role string) (*RetrieveProjectResponse, error)

func (*Doppler) CreateServiceAccount

func (dp *Doppler) CreateServiceAccount(params ServiceAccountBodyParams) (*ServiceAccountModel, error)

func (*Doppler) CreateServiceToken

func (dp *Doppler) CreateServiceToken(params CreateTokenParams) (*ServiceTokenModel, error)

func (*Doppler) CreateSync

func (dp *Doppler) CreateSync(queryParams SyncQueryParams, bodyParams SyncBodyParams) (*SyncData, error)

Create a new secrets sync.

func (*Doppler) CreateWorkplaceRole

func (dp *Doppler) CreateWorkplaceRole(params CreateRoleParams) (*WorkplaceRole, error)

func (*Doppler) DeleteConfig

func (dp *Doppler) DeleteConfig(params DeletConfigParams) (*Success, error)

Permanently delete the config.

func (*Doppler) DeleteEnvironment

func (dp *Doppler) DeleteEnvironment(projectName string, environmentSlug string) (*Success, error)

Delete Environment

  • projectName: The project's name
  • environmentSlug: The environment's slug

func (*Doppler) DeleteGroup

func (dp *Doppler) DeleteGroup(slug string) (string, error)

func (*Doppler) DeleteIP

func (dp *Doppler) DeleteIP(project, config, ip string) (string, error)

Delete a trusted IP

func (*Doppler) DeleteIntegration

func (dp *Doppler) DeleteIntegration(integration string) (string, error)

TODO

func (*Doppler) DeleteMember

func (dp *Doppler) DeleteMember(slug, memberSlug, memberType string) (string, error)

func (*Doppler) DeleteProject

func (dp *Doppler) DeleteProject(project_id string) (*Success, error)

delete project

func (*Doppler) DeleteProjectRole

func (dp *Doppler) DeleteProjectRole(role string) (string, error)

func (*Doppler) DeleteSecret

func (dp *Doppler) DeleteSecret(project, config, name string) (string, error)

func (*Doppler) DeleteServiceAccount

func (dp *Doppler) DeleteServiceAccount(slug string) (string, error)

func (*Doppler) DeleteServiceToken

func (dp *Doppler) DeleteServiceToken(params DeleteTokenParams) (*Success, error)

func (*Doppler) DeleteSync

func (dp *Doppler) DeleteSync(params SyncQueryParams) (string, error)

Delete an existing sync.

func (*Doppler) DeleteWorkplaceRole

func (dp *Doppler) DeleteWorkplaceRole(role string) (string, error)

func (*Doppler) DownloadSecret

func (dp *Doppler) DownloadSecret(params DownloadSecretParams) (string, error)

func (*Doppler) GetWorkplace

func (dp *Doppler) GetWorkplace() (*Workplace, error)

get workplace info

func (*Doppler) GetWorkplaceUser

func (dp *Doppler) GetWorkplaceUser(user_id string, settings bool) (*WorkplaceUser, error)

Get a specific user in a workplace @param settings: bool If true, the api will return more information if user has e.g. SAML enabled and/or Multi Factor Auth enabled

func (*Doppler) GetWorkplaceUsers

func (dp *Doppler) GetWorkplaceUsers(settings bool, page int32) (*WorkplaceUsers, error)

Get all users of a workplace @param settings: bool If true, the api will return more information if users have e.g. SAML enabled and/or Multi Factor Auth enabled

func (*Doppler) IssueLease

func (dp *Doppler) IssueLease(args IssueLeaseArgs) (data *interface{}, err error)

Issue a lease for a dynamic secret

func (*Doppler) ListConfigLogs

func (dp *Doppler) ListConfigLogs(projectName, config string, page int, perPage *int) (*ConfigLogs, error)

List config logs

  • projectName: Unique identifier for the project
  • config: Name of the config object
  • page: page number
  • perPage: Items per page (default: 20)

func (*Doppler) ListConfigs

func (dp *Doppler) ListConfigs(projectName, environmentSlug string, page int, perPage *int) (*Configs, error)

Fetch all configs

  • projectName: Unique identifier for the project
  • environmentSlug: The environment's slug
  • page: page number
  • perPage: Items per page (default: 20)

func (*Doppler) ListEnvironments

func (dp *Doppler) ListEnvironments(projectName string) (*Environments, error)

List environments

  • projectName: The project's name

func (*Doppler) ListGroups

func (dp *Doppler) ListGroups(page, limit *int) (*Groups, error)

func (*Doppler) ListIntegrations

func (dp *Doppler) ListIntegrations() (*Integrations, error)

func (*Doppler) ListInvites

func (dp *Doppler) ListInvites(page, limit *int) (*Invites, error)

func (*Doppler) ListProjectMembers

func (dp *Doppler) ListProjectMembers(project_id string, page, per_page int32) (*ProjectMembersResp, error)

List All Project Members

func (*Doppler) ListProjectPermissions

func (dp *Doppler) ListProjectPermissions() (*ProjectPermissions, error)

func (*Doppler) ListProjectRoles

func (dp *Doppler) ListProjectRoles() (*ProjectRoles, error)

func (*Doppler) ListProjects

func (dp *Doppler) ListProjects(page int, limit *int) (*Projects, error)

list projects

func (*Doppler) ListSecretNames

func (dp *Doppler) ListSecretNames(params ListSecretNamesParams) (*SecretNames, error)

List Secret names

func (*Doppler) ListSecrets

func (dp *Doppler) ListSecrets(params ListSecretsParams) (*Secrets, error)

func (*Doppler) ListServiceAccounts

func (dp *Doppler) ListServiceAccounts(page, limit *int) (*ServiceAccounts, error)

func (*Doppler) ListServiceTokens

func (dp *Doppler) ListServiceTokens(project, config string) (*ServiceTokens, error)

func (*Doppler) ListTrustedIPs

func (dp *Doppler) ListTrustedIPs(project, config string) (*IPs, error)

List trusted IPs

func (*Doppler) ListWorkplacePermissions

func (dp *Doppler) ListWorkplacePermissions() (*WorkplacePermissions, error)

func (*Doppler) ListWorkplaceRoles

func (dp *Doppler) ListWorkplaceRoles() (*WorkplaceRoles, error)

func (*Doppler) LockConfig

func (dp *Doppler) LockConfig(params DeletConfigParams) (*IConfig, error)

Prevent the config from being renamed or deleted.

func (*Doppler) RemoveProjectMember

func (dp *Doppler) RemoveProjectMember(member_type MemberType, member_slug, project_id string) error

Remove Project Member

func (*Doppler) RenameEnvironment

func (dp *Doppler) RenameEnvironment(projectName string, environmentSlug string, params EnvironmentBodyParams) (*IEnvironment, error)

Rename Environment

  • projectName: The project's name
  • environmentSlug: The environment's slug
  • params: Request Body parameters

func (*Doppler) RetrieveConfig

func (dp *Doppler) RetrieveConfig(project, config string) (*IConfig, error)

Fetch a config's details

  • project: Unique identifier for the project
  • config: Name of the config object

func (*Doppler) RetrieveConfigLog

func (dp *Doppler) RetrieveConfigLog(project, config, logID string) (*IConfigLog, error)

Fetch a config log's details

  • project: Unique identifier for the project
  • config: Name of the config object
  • logID: Unique identifier for the log object

func (*Doppler) RetrieveEnvironment

func (dp *Doppler) RetrieveEnvironment(projectName string, environmentSlug string) (*IEnvironment, error)

Retrieve environment

  • projectName: The project's name
  • environmentSlug: The environment's slug

func (*Doppler) RetrieveGroup

func (dp *Doppler) RetrieveGroup(slug string) (*GroupData, error)

func (*Doppler) RetrieveIntegration

func (dp *Doppler) RetrieveIntegration(integrationSlug string) (*IntegrationData, error)

func (*Doppler) RetrieveLog

func (dp *Doppler) RetrieveLog(log_id string) (*ActivityLog, error)

get activity log

func (*Doppler) RetrieveLogs

func (dp *Doppler) RetrieveLogs(page int, limit *int) (*ActivityLogs, error)

list activity logs

func (*Doppler) RetrieveProject

func (dp *Doppler) RetrieveProject(id string) (*IProject, error)

retrieve project

func (*Doppler) RetrieveProjectMember

func (dp *Doppler) RetrieveProjectMember(membertype MemberType, slug, project_id string) (*Member, error)

Retrieve Project Member

func (*Doppler) RetrieveProjectRole

func (dp *Doppler) RetrieveProjectRole(role string) (*RetrieveProjectResponse, error)

func (*Doppler) RetrieveSecret

func (dp *Doppler) RetrieveSecret(project, config, name string) (*Secret, error)

Retrieves a secret

  • project: Unique identifier for the project object
  • config: Name of the config object
  • name: Name of the secret

func (*Doppler) RetrieveServiceAccount

func (dp *Doppler) RetrieveServiceAccount(slug string) (*ServiceAccountModel, error)

func (*Doppler) RetrieveSync

func (dp *Doppler) RetrieveSync(params SyncQueryParams) (*SyncData, error)

Retrieve an existing secrets sync.

func (*Doppler) RetrieveWorkplaceRole

func (dp *Doppler) RetrieveWorkplaceRole(role string) (*RetrieveWorkplaceResponse, error)

func (*Doppler) RevokeLease

func (dp *Doppler) RevokeLease(args RevokeLeaseArgs) (data *RevokeLeaseData, err error)

Revoke a lease for a dynamic secret

func (*Doppler) RevokeTokens

func (dp *Doppler) RevokeTokens(params []RevokeTokenParam) error

Revoke auth tokens

func (*Doppler) RollbackConfigLog

func (dp *Doppler) RollbackConfigLog(project, config, logID string) (*IConfigLog, error)

- project: Unique identifier for the project - config: Name of the config object - logID: Unique identifier for the log object

func (*Doppler) ShareEncryptedSecret

func (dp *Doppler) ShareEncryptedSecret(args interface{}) (data interface{}, err error)

Generate a Doppler Share link by sending an encrypted secret. The receive flow the user goes through will be end-to-end encrypted where the encrypted secret will be decrypted on the browser.

func (*Doppler) SharePlainTextSecret

func (dp *Doppler) SharePlainTextSecret(args PlainTextArgs) (data *PlainTextResp, err error)

Generate a Doppler Share link by sending a plain text secret. This endpoint is not end-to-end encrypted as you are sending the secret in plain text. At no point do we store the plain text secret or the password in our systems. The receive flow the user goes through will be end-to-end encrypted where the encrypted secret will be decrypted on the browser.

func (*Doppler) UnlockConfig

func (dp *Doppler) UnlockConfig(params DeletConfigParams) (*IConfig, error)

Allow the config to be renamed and/or deleted.

func (*Doppler) UpdateConfig

func (dp *Doppler) UpdateConfig(params ModifyConfigParams) (*IConfig, error)

Modify an existing config.

func (*Doppler) UpdateGroup

func (dp *Doppler) UpdateGroup(slug string, params GroupBodyParams) (*GroupData, error)

func (*Doppler) UpdateIntegration

func (dp *Doppler) UpdateIntegration(params UpdateIntegrationParams) (string, error)

TODO

func (*Doppler) UpdateNote

func (dp *Doppler) UpdateNote(params SetNoteParams) (*NoteResponse, error)

Set a note on a secret

func (*Doppler) UpdateProject

func (dp *Doppler) UpdateProject(params UpdateProjectParams) (*IProject, error)

update project

func (*Doppler) UpdateProjectMember

func (dp *Doppler) UpdateProjectMember(project_id, member_slug string, member_type MemberType, args UpdateProjectMemberParams) (*Member, error)

Update Project Member

func (*Doppler) UpdateProjectRole

func (dp *Doppler) UpdateProjectRole(role string) (*RetrieveProjectResponse, error)

func (*Doppler) UpdateSecret

func (dp *Doppler) UpdateSecret(params UpdateSecretParams) (*Secrets, error)

func (*Doppler) UpdateServiceAccount

func (dp *Doppler) UpdateServiceAccount(slug string, params ServiceAccountBodyParams) (*ServiceAccountModel, error)

func (*Doppler) UpdateWorkplace

func (dp *Doppler) UpdateWorkplace(params WorkplaceParams) (*Workplace, error)

update work place info

func (*Doppler) UpdateWorkplaceRole

func (dp *Doppler) UpdateWorkplaceRole(role string) (*WorkplaceRole, error)

type DopplerError

type DopplerError struct {
	Status   int      `json:"status"`
	Messages []string `json:"message"`
}

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 EncryptedSecretArgs struct {
	Secret      string `json:"secret"`
	ExpireViews int32  `json:"expire_views"`
	ExpireDays  int32  `json:"expire_days"`
}

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 EnvironmentBodyParams struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Environments

type Environments struct {
	Environments []Environment `json:"environments"`
	Page         int           `json:"page"`
	Success      bool          `json:"success"`
}

type FailedRequest

type FailedRequest struct {
	Messages []string `json:"messages"`
	Success  bool     `json:"success"`
}

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 GroupBodyParams struct {
	Name               string `json:"name,omitempty"`
	DefaultProjectRole string `json:"default_project_role,omitempty"` // Identifier of the project role
}

type GroupData

type GroupData struct {
	Group    Group     `json:"group,omitempty"`
	Projects []Project `json:"projects,omitempty"`
	Members  []Member  `json:"members,omitempty"`
}

type Groups

type Groups struct {
	Groups  []Group `json:"groups,omitempty"`
	Success bool    `json:"success,omitempty"`
}

type IConfig

type IConfig struct {
	Config  Config `json:"config"`
	Success bool   `json:"success"`
}

type IConfigLog

type IConfigLog struct {
	Log     ConfigLog `json:"log"`
	Success bool      `json:"success"`
}

type IEnvironment

type IEnvironment struct {
	Environment Environment `json:"environment"`
	Success     bool        `json:"success,omitempty"`
}

type IP

type IP struct {
	IP string `json:"ip"`
}

type IProject

type IProject struct {
	Project Project `json:"project"`
	Success bool    `json:"success"`
}

type IPs

type IPs struct {
	IPs     []string `json:"ips"`
	Success bool     `json:"success"`
}

type Integration

type Integration struct {
	Slug    string `json:"slug,omitempty"`
	Name    string `json:"name,omitempty"`
	Type    string `json:"type,omitempty"`
	Kind    string `json:"kind,omitempty"`
	Enabled bool   `json:"enabled,omitempty"`
}

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 Invites

type Invites struct {
	Invites []Invite `json:"invites"`
	Success bool     `json:"success"`
}

type IssueLeaseArgs

type IssueLeaseArgs struct {
	Project       string `json:"project"`
	Config        string `json:"config"`
	DynamicSecret string `json:"dynamic_secret"`
	TtlSec        int32  `json:"ttl_sec"`
}

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 Member

type Member struct {
	Type                  string      `json:"type"`
	Slug                  string      `json:"slug"`
	Role                  Role        `json:"role"`
	AccessAllEnvironments bool        `json:"access_all_environments"`
	Environments          interface{} `json:"environments"`
}

type MemberBodyParams

type MemberBodyParams struct {
	Type string `json:"type,omitempty"`
	Slug string `json:"slug,omitempty"` // The member's slug
}

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 NoteResponse struct {
	Secret string `json:"secret"`
	Note   string `json:"note"`
}

type PlainTextArgs

type PlainTextArgs struct {
	Secret      string `json:"secret"`
	ExpireViews int32  `json:"expire_views"`
	ExpireDays  int32  `json:"expire_days"`
}

type PlainTextResp

type PlainTextResp struct {
	Url              string `json:"url"`
	AuthenticatedUrl string `json:"authenticated_url"`
	Password         string `json:"password"`
	Success          bool   `json:"success"`
}

type Project

type Project struct {
	ID          string      `json:"id"`
	Slug        string      `json:"slug"`
	Name        string      `json:"name"`
	Description interface{} `json:"description"`
	CreatedAt   string      `json:"created_at"`
}

type ProjectMemberResp

type ProjectMemberResp struct {
	Member  Member `json:"member"`
	Success bool   `json:"success"`
}

type ProjectMembersResp

type ProjectMembersResp struct {
	Members []Member `json:"members"`
	Success bool     `json:"success"`
}

type ProjectPermissions

type ProjectPermissions struct {
	Permissions []string `json:"permissions,omitempty"`
	Success     bool     `json:"success,omitempty"`
}

type ProjectRole

type ProjectRole 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"`
}

type ProjectRoles

type ProjectRoles struct {
	ProjectRoles []ProjectRole `json:"roles,omitempty"`
	Success      bool          `json:"success,omitempty"`
}

type Projects

type Projects struct {
	Projects []Project `json:"projects"`
	Page     int       `json:"page"`
	Success  bool      `json:"success"`
}

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 RevokeLeaseArgs struct {
	Project       string `json:"project"`
	Config        string `json:"config"`
	DynamicSecret string `json:"dynamic_secret"`
	Slug          string `json:"slug"`
}

type RevokeLeaseData

type RevokeLeaseData struct {
	Success bool `json:"success"`
}

type RevokeTokenParam

type RevokeTokenParam struct {
	Token string `json:"token,omitempty"`
}

type Role

type Role struct {
	Identifier string `json:"identifier"`
}

type RollbackConfigLogParams

type RollbackConfigLogParams struct {
	Project string `json:"project"` // Unique identifier for the project (project name)
	Config  string `json:"config"`  // Name of the config object
	Log     string `json:"log"`     // Unique identifier for the log object
}

type Secret

type Secret struct {
	Name    string      `json:"name"`
	Value   SecretValue `json:"value"`
	Success bool        `json:"success"`
}

type SecretNames

type SecretNames struct {
	Names   []string `json:"names"`
	Success bool     `json:"success"`
}

type SecretValue

type SecretValue struct {
	Raw                string `json:"raw"`
	Computed           string `json:"computed"`
	Note               string `json:"note"`
	RawVisibility      string `json:"rawVisibility,omitempty"`
	ComputedVisibility string `json:"computedVisibility,omitempty"`
}

type Secrets

type Secrets struct {
	Secrets map[string]Secret `json:"secrets"`
	Success bool              `json:"success"`
}

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 SetNoteParams struct {
	Project string `json:"project"` // Unique identifier for the project object(project name)
	Config  string `json:"config"`  // Name of the config object
	Secret  string `json:"secret"`
	Note    string `json:"note"`
}

type Success

type Success struct {
	Success bool `json:"success"`
}

type Sync

type Sync struct {
	Slug         string `json:"slug,omitempty"`
	Integration  string `json:"integration,omitempty"`
	Project      string `json:"project,omitempty"`
	Config       string `json:"config,omitempty"`
	Enabled      bool   `json:"enabled,omitempty"`
	LastSyncedAt string `json:"last_synced_at,omitempty"`
}

type SyncBodyParams

type SyncBodyParams struct {
	Integration  string // The integration slug which the sync will use
	ImportOption string // prefer_doppler or prefer_integration, defaults to none
}

type SyncData

type SyncData struct {
	Sync    Sync `json:"sync,omitempty"`
	Success bool `json:"success,omitempty"`
}

type SyncQueryParams

type SyncQueryParams struct {
	Project          string // The project slug
	Config           string // The config slug
	Sync             string // The sync slug: use with RetrieveSync and DeleteSync
	DeleteFromTarget bool   // use with DeleteSync function only
}

type UpdateIntegrationParams

type UpdateIntegrationParams struct {
	Name        string `json:"name,omitempty"`        // The new name of the integration
	Data        string `json:"data,omitempty"`        // The new authentication data for the integration
	Integration string `json:"integration,omitempty"` // The slug of the integration to update
}

type UpdateProjectMemberParams

type UpdateProjectMemberParams struct {
	Role         string   `json:"role"`
	Environments []string `json:"environments"`
}

type UpdateProjectParams

type UpdateProjectParams struct {
	ProjectID   string `json:"project"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type UpdateSecretParams

type UpdateSecretParams struct {
	Project string            `json:"project"`
	Config  string            `json:"config"`
	Secrets map[string]string `json:"secrets"` // map of secret to new value
}

type User

type User struct {
	Email           string `json:"email"`
	Name            string `json:"name"`
	Username        string `json:"username"`
	ProfileImageURL string `json:"profile_image_url"`
}

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 WorkplaceClass struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	BillingEmail string `json:"billing_email"`
}

type WorkplaceParams

type WorkplaceParams struct {
	Name         string `json:"name,omitempty"`
	BillingEmail string `json:"billing_email,omitempty"`
}

type WorkplacePermissions

type WorkplacePermissions struct {
	Permissions []string `json:"permissions,omitempty"`
	Success     bool     `json:"success,omitempty"`
}

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 WorkplaceRoleObject struct {
	Identifier  string   `json:"identifier,omitempty"`  // Identifier of an existing workplace role
	Permissions []string `json:"permissions,omitempty"` // Workplace permissions to grant
}

type WorkplaceRoles

type WorkplaceRoles struct {
	WorkplaceRoles []WorkplaceRole `json:"roles,omitempty"`
	Success        bool            `json:"success,omitempty"`
}

type WorkplaceUser

type WorkplaceUser struct {
	ID        string `json:"id"`
	Access    string `json:"access"`
	CreatedAt string `json:"created_at"`
	User      WUser  `json:"user"`
}

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"`
}

Jump to

Keyboard shortcuts

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