credentials

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	ID         string                   `json:"id,omitempty"`
	Desc       string                   `json:"desc,omitempty"`
	Roles      []mongodbatlas.AtlasRole `json:"roles,omitempty"`
	PrivateKey string                   `json:"privateKey,omitempty"`
	PublicKey  string                   `json:"publicKey,omitempty"`
	OrgID      string                   `json:"orgID,omitempty"`
}

func (APIKey) MongoKey

func (k APIKey) MongoKey() mongodbatlas.APIKey

type BrokerAuth

type BrokerAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Credentials

type Credentials struct {
	Broker *BrokerAuth
	// contains filtered or unexported fields
}

func FromCredHub

func FromCredHub(baseURL string) (*Credentials, error)

func FromEnv

func FromEnv(baseURL string) (*Credentials, error)

func (*Credentials) ByAlias

func (c *Credentials) ByAlias(alias string) (APIKey, error)

func (*Credentials) ByOrg

func (c *Credentials) ByOrg(id string) (APIKey, error)

func (*Credentials) Keys

func (c *Credentials) Keys() map[string]APIKey

Jump to

Keyboard shortcuts

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