atlas

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const ApplicationGZip = "application/gzip"

ApplicationGZip -

View Source
const ApplicationJSON = "application/json"

ApplicationJSON -

View Source
const BaseURL = "https://cloud.mongodb.com/api/atlas/v1.0"

BaseURL -

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API stores Atlas API key

func NewKey

func NewKey(publicKey string, privateKey string) *API

NewKey returns API struct

func ParseURI

func ParseURI(uri string) (*API, error)

ParseURI returns API struct from a URI

func (*API) AddAlerts added in v0.5.4

func (api *API) AddAlerts(filename string) (string, error)

AddAlerts reads from a file and set alerts

func (*API) AlertsDo added in v0.5.4

func (api *API) AlertsDo(method string, data string) (string, error)

AlertsDo execute a command

func (*API) ClustersDo added in v0.5.4

func (api *API) ClustersDo(method string, data string) (string, error)

ClustersDo execute a command

func (*API) DownloadFTDC added in v0.5.3

func (api *API) DownloadFTDC() (string, error)

DownloadFTDC downloads logs

func (*API) DownloadLogs added in v0.5.3

func (api *API) DownloadLogs() ([]string, error)

DownloadLogs downloads logs

func (*API) Execute added in v0.5.3

func (api *API) Execute() string

Execute executes rest calls

func (*API) Get added in v0.5.3

func (api *API) Get(uri string) ([]byte, error)

Get performs HTTP GET function

func (*API) GetCluster added in v0.5.4

func (api *API) GetCluster(groupID string, clusterName string) (map[string]interface{}, error)

GetCluster gets clusters by a group

func (*API) GetClusters

func (api *API) GetClusters(groupID string) (map[string]interface{}, error)

GetClusters gets clusters by a group

func (*API) GetClustersSummary

func (api *API) GetClustersSummary() (string, error)

GetClustersSummary retrieve clusters summary for a user

func (*API) GetGroups

func (api *API) GetGroups() (map[string]interface{}, error)

GetGroups get processes of a user

func (*API) GetGroupsByID

func (api *API) GetGroupsByID(groupID string) (map[string]interface{}, error)

GetGroupsByID get processes of a user

func (*API) GetLogNames added in v0.5.3

func (api *API) GetLogNames() []string

GetLogNames gets downloaded log names

func (*API) GetProcesses

func (api *API) GetProcesses(groupID string) (map[string]interface{}, error)

GetProcesses get processes of a user

func (*API) GetProjects added in v0.5.3

func (api *API) GetProjects() ([]Project, error)

GetProjects returns an array of group IDs

func (*API) Patch added in v0.5.3

func (api *API) Patch(uri string, body []byte) ([]byte, error)

Patch performs HTTP PATCH function

func (*API) SetAcceptType added in v0.5.3

func (api *API) SetAcceptType(acceptType string)

SetAcceptType sets acceptType

func (*API) SetAlerts added in v0.5.4

func (api *API) SetAlerts(alerts bool)

SetAlerts sets alerts

func (*API) SetAlertsFile added in v0.5.4

func (api *API) SetAlertsFile(alertsFile string)

SetAlertsFile sets alerts

func (*API) SetArgs added in v0.5.3

func (api *API) SetArgs(args []string)

SetArgs sets args

func (*API) SetContentType added in v0.5.3

func (api *API) SetContentType(contentType string)

SetContentType sets contentType

func (*API) SetFTDC added in v0.5.3

func (api *API) SetFTDC(ftdc bool)

SetFTDC sets ftdc

func (*API) SetInfo added in v0.5.3

func (api *API) SetInfo(info bool)

SetInfo sets info

func (*API) SetLoginfo added in v0.5.3

func (api *API) SetLoginfo(loginfo bool)

SetLoginfo sets loginfo

func (*API) SetPause added in v0.5.3

func (api *API) SetPause(pause bool)

SetPause sets pause

func (*API) SetRequest added in v0.5.3

func (api *API) SetRequest(request string)

SetRequest sets request

func (*API) SetResume added in v0.5.3

func (api *API) SetResume(resume bool)

SetResume sets resume

func (*API) SetVerbose

func (api *API) SetVerbose(verbose bool)

SetVerbose sets verbose

type FTDC added in v0.5.3

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

FTDC stores Atlas logs API info

type Project added in v0.5.3

type Project struct {
	ID    string
	Name  string
	OrgID string
}

Project stores project info

Jump to

Keyboard shortcuts

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