Categorygithub.com/kperreau/doppler-go
modulepackage
0.0.0-20230828152523-7a2a47a0c89f
Repository: https://github.com/kperreau/doppler-go.git
Documentation: pkg.go.dev

# README

 

doppler-go

A Go client for the Doppler API.

 

codecov Go Report Card Codacy Badge Maintainability go.dev reference

 

About

doppler-go is a Go client for the Doppler API. It provides a simple and easy to use interface for interacting with the Doppler API.

The base design is heavily inspired by the Stripe Go client, yet there are still some distinct differences.

Stability

This project is currently in an early stage of development. I have not yet confirmed the functionality of all endpoints through extensive end-to-end testing. Therefore, I cannot guarantee for any stability or correctness.

I plan to support this project for the foreseeable future. However, I cannot guarantee that I will be able to fix bugs or add new features in a timely manner.

If you find any bugs or have any suggestions, please open an issue or a pull request.

Features

  • Doppler REST API v3:
    • Audit
    • Auth
    • Configs
    • Config Logs
    • Dynamic Secrets
    • Environments
    • Projects
    • Secrets
    • Service Tokens
    • Token Sharing
    • Workplaces

Install

go get -u github.com/kperreau/doppler-go

Example usage

package main

import (
  "context"
  "fmt"
  "log"

  "github.com/kperreau/doppler-go"
  "github.com/kperreau/doppler-go/secret"
)

func main() {
  // Set your API key
  doppler.Key = "YOUR_API_KEY"

  // List all your secrets
  secrets, err := secret.List(context.Background(), &doppler.SecretListOptions{
    Project: "YOUR_PROJECT",
    Config:  "YOUR_CONFIG",
  })
  if err != nil {
    log.Fatalf("failed to list secrets: %v", err)
  }

  for name, value := range secrets {
    fmt.Printf("%s: %v\n", name, value)
  }
}

Contributing

Contributions of all kinds are very welcome! Feel free to check our open issues. Please also take a look at the contribution guidelines.

Show your support

Please give a ⭐️ if you like this project! This helps us to get more visibility and helps other people to find this project.

# Packages

Package activitylog provides a client for the Doppler API's logs endpoints.
Package audit provides a client for the Doppler API's audit endpoints.
Package auth provides a client for the Doppler API's auth endpoints.
Package config provides a client for the Doppler API's configs endpoints.
Package configlog provides a client for the Doppler API's config logs endpoints.
No description provided by the author
Package environments provides a client for the Doppler API's environments endpoints.
Package logging provides a simple logging interface.
Package pointer provides functions to create pointers to basic types.
Package project provides a client for the Doppler API's project endpoints.
Package secret provides a client for the Doppler API's secret endpoints.
Package servicetoken provides a client for the Doppler API's service token endpoints.
Package share provides a client for the Doppler API's share endpoints.
Package workplace provides a client for the Doppler API's workplace endpoints.

# Functions

GetBackend returns a new backend with the default configuration.
GetBackendWithConfig returns a new backend with the given configuration.
SetAppInfo sets the information about the "app" which this integration belongs to.

# Constants

APIURL is the base URL for the API.
EncryptionKDF is the key derivation function used for encrypted secrets.
EncryptionSaltRounds is the number of salt rounds used by the key derivation function.
SDKVersion is the version of the SDK.
UnknownPlatform is the platform name for unknown platforms.

# Variables

Key is the API key used to authenticate with the API.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIResponse is the base response type for all Doppler API responses.
AppInfo contains information about the "app" which this integration belongs to.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BackendConfig is the configuration for the backend.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RateLimit is the ratelimit information returned by the API.
Request is the base request type all Backend calls.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Backend is the backend used by the SDK.
Response is the base response type all Backend calls.