Documentation ¶
Index ¶
- type Bucket
- type BucketCreatePayload
- type BucketDeletePayload
- type BucketRole
- type BucketsList
- type Cloud
- type Clouds
- type CloudsList
- type Cluster
- type ClusterCreatePayload
- type Clusters
- type ClustersList
- type CouchbaseCloudClient
- func (client *CouchbaseCloudClient) CreateBucket(cluster *Cluster, payload *BucketCreatePayload) error
- func (client *CouchbaseCloudClient) CreateCluster(payload *ClusterCreatePayload) error
- func (client *CouchbaseCloudClient) CreateDatabaseUser(cluster *Cluster, payload *DatabaseUserCreatePayload) error
- func (client *CouchbaseCloudClient) CreateProject(payload *CreateProjectPayload) error
- func (client *CouchbaseCloudClient) DeleteBucket(cluster *Cluster, payload *BucketDeletePayload) error
- func (client *CouchbaseCloudClient) DeleteCluster(cluster *Cluster) error
- func (client *CouchbaseCloudClient) DeleteDatabaseUser(cluster *Cluster, payload *DatabaseUserDeletePayload) error
- func (client *CouchbaseCloudClient) DeleteProject(projectId string) error
- func (client *CouchbaseCloudClient) GetCloud(cloudId string) error
- func (client *CouchbaseCloudClient) GetProject(projectId string) (*Project, error)
- func (client *CouchbaseCloudClient) ListBuckets(cluster *Cluster) (*BucketsList, error)
- func (client *CouchbaseCloudClient) ListCloudPages(options *ListCloudsOptions, fn func(Clouds, bool) bool) error
- func (client *CouchbaseCloudClient) ListClouds(options *ListCloudsOptions) (*CloudsList, error)
- func (client *CouchbaseCloudClient) ListClusterPages(opts *ListClustersOptions, fn func(Clusters, bool) bool) error
- func (client *CouchbaseCloudClient) ListClusters(options *ListClustersOptions) (*ClustersList, error)
- func (client *CouchbaseCloudClient) ListDatabaseUsers(cluster *Cluster) (*DatabaseUsersList, error)
- func (client *CouchbaseCloudClient) ListProjectPages(opts *ListProjectsOptions, fn func(Projects, bool) bool) error
- func (client *CouchbaseCloudClient) ListProjects(options *ListProjectsOptions) (*ProjectsList, error)
- func (client *CouchbaseCloudClient) ListUserPages(options *ListUsersOptions, fn func(Users, bool) bool) error
- func (client *CouchbaseCloudClient) ListUsers(options *ListUsersOptions) (*UsersList, error)
- func (client *CouchbaseCloudClient) UpdateBucket(cluster *Cluster, payload []*BucketCreatePayload) error
- type CreateProjectPayload
- type Cursor
- type DatabaseUser
- type DatabaseUserCreatePayload
- type DatabaseUserDeletePayload
- type DatabaseUsers
- type DatabaseUsersList
- type ListCloudsOptions
- type ListClustersOptions
- type ListProjectsOptions
- type ListUsersOptions
- type Project
- type Projects
- type ProjectsList
- type User
- type Users
- type UsersList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketCreatePayload ¶
type BucketDeletePayload ¶
type BucketDeletePayload struct {
Name string `json:"name"`
}
type BucketRole ¶
type BucketsList ¶
type CloudsList ¶
type ClusterCreatePayload ¶
type ClustersList ¶
type CouchbaseCloudClient ¶
type CouchbaseCloudClient struct { BaseURL string HTTPClient *http.Client // contains filtered or unexported fields }
func NewClient ¶
func NewClient(apiAccessKey string, apiSecretKey string) *CouchbaseCloudClient
func (*CouchbaseCloudClient) CreateBucket ¶
func (client *CouchbaseCloudClient) CreateBucket(cluster *Cluster, payload *BucketCreatePayload) error
func (*CouchbaseCloudClient) CreateCluster ¶
func (client *CouchbaseCloudClient) CreateCluster(payload *ClusterCreatePayload) error
func (*CouchbaseCloudClient) CreateDatabaseUser ¶
func (client *CouchbaseCloudClient) CreateDatabaseUser(cluster *Cluster, payload *DatabaseUserCreatePayload) error
func (*CouchbaseCloudClient) CreateProject ¶
func (client *CouchbaseCloudClient) CreateProject(payload *CreateProjectPayload) error
func (*CouchbaseCloudClient) DeleteBucket ¶
func (client *CouchbaseCloudClient) DeleteBucket(cluster *Cluster, payload *BucketDeletePayload) error
func (*CouchbaseCloudClient) DeleteCluster ¶
func (client *CouchbaseCloudClient) DeleteCluster(cluster *Cluster) error
func (*CouchbaseCloudClient) DeleteDatabaseUser ¶
func (client *CouchbaseCloudClient) DeleteDatabaseUser(cluster *Cluster, payload *DatabaseUserDeletePayload) error
func (*CouchbaseCloudClient) DeleteProject ¶
func (client *CouchbaseCloudClient) DeleteProject(projectId string) error
func (*CouchbaseCloudClient) GetCloud ¶
func (client *CouchbaseCloudClient) GetCloud(cloudId string) error
func (*CouchbaseCloudClient) GetProject ¶
func (client *CouchbaseCloudClient) GetProject(projectId string) (*Project, error)
func (*CouchbaseCloudClient) ListBuckets ¶
func (client *CouchbaseCloudClient) ListBuckets(cluster *Cluster) (*BucketsList, error)
func (*CouchbaseCloudClient) ListCloudPages ¶
func (client *CouchbaseCloudClient) ListCloudPages(options *ListCloudsOptions, fn func(Clouds, bool) bool) error
ListCloudPages allows iterating over all the clouds. For every page of cloud items it will call the callback and pass the page worth of clouds as well as a boolean that indicates whether is is the last page or not. The function iterates over all the pages either until the callback returns false, the REST endpoint returns an error or it runs out of pages.
func (*CouchbaseCloudClient) ListClouds ¶
func (client *CouchbaseCloudClient) ListClouds(options *ListCloudsOptions) (*CloudsList, error)
func (*CouchbaseCloudClient) ListClusterPages ¶
func (client *CouchbaseCloudClient) ListClusterPages(opts *ListClustersOptions, fn func(Clusters, bool) bool) error
ListClusterPages allows iterating over all the clusters. For every page of cluster items it will call the callback and pass the page worth of clouds as well as a boolean that indicates whether is is the last page or not. The function iterates over all the pages either until the callback returns false, the REST endpoint returns an error or it runs out of pages.
func (*CouchbaseCloudClient) ListClusters ¶
func (client *CouchbaseCloudClient) ListClusters(options *ListClustersOptions) (*ClustersList, error)
func (*CouchbaseCloudClient) ListDatabaseUsers ¶
func (client *CouchbaseCloudClient) ListDatabaseUsers(cluster *Cluster) (*DatabaseUsersList, error)
func (*CouchbaseCloudClient) ListProjectPages ¶
func (client *CouchbaseCloudClient) ListProjectPages(opts *ListProjectsOptions, fn func(Projects, bool) bool) error
ListProjectPages allows iterating over all the projects. For every page of project items it will call the callback and pass the page worth of projects as well as a boolean that indicates whether is is the last page or not. The function iterates over all the pages either until the callback returns false, the REST endpoint returns an error or it runs out of pages.
func (*CouchbaseCloudClient) ListProjects ¶
func (client *CouchbaseCloudClient) ListProjects(options *ListProjectsOptions) (*ProjectsList, error)
func (*CouchbaseCloudClient) ListUserPages ¶
func (client *CouchbaseCloudClient) ListUserPages(options *ListUsersOptions, fn func(Users, bool) bool) error
ListUserPages allows iterating over all the users. For every page of user items it will call the callback and pass the page worth of users as well as a boolean that indicates whether is is the last page or not. The function iterates over all the pages either until the callback returns false, the REST endpoint returns an error or it runs out of pages.
func (*CouchbaseCloudClient) ListUsers ¶
func (client *CouchbaseCloudClient) ListUsers(options *ListUsersOptions) (*UsersList, error)
func (*CouchbaseCloudClient) UpdateBucket ¶
func (client *CouchbaseCloudClient) UpdateBucket(cluster *Cluster, payload []*BucketCreatePayload) error
type CreateProjectPayload ¶
type CreateProjectPayload struct {
Name string `json:"name"`
}
type DatabaseUser ¶
type DatabaseUser struct { UserId string `json:userId,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Access []BucketRole `json:"buckets,omitempty"` }
type DatabaseUserCreatePayload ¶
type DatabaseUserCreatePayload struct { UserId string `json:userId,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Buckets []BucketRole `json:"buckets,omitempty"` AllBucketsAccess string `json:"allBucketsAccess,omitempty"` }
type DatabaseUserDeletePayload ¶
type DatabaseUserDeletePayload struct {
Username string `json:"username,omitempty"`
}
type DatabaseUsers ¶
type DatabaseUsers []DatabaseUser
type DatabaseUsersList ¶
type DatabaseUsersList struct { Cursor Cursor `json:"cursor"` Data []DatabaseUser `json:"data"` }