Documentation
¶
Index ¶
- Constants
- type ACL
- type Account
- type AccountResponse
- type PageOptions
- type PaginationMeta
- type ReqOpt
- type User
- type UserResponse
- type UserSingleResponse
- type VultrClient
- func (c *VultrClient) GetUserByID(ctx context.Context, userID string) (User, annotations.Annotations, error)
- func (c *VultrClient) ListAccountACLs(ctx context.Context) ([]string, annotations.Annotations, error)
- func (c *VultrClient) ListUsers(ctx context.Context, options PageOptions) ([]User, string, annotations.Annotations, error)
Constants ¶
View Source
const ItemsPerPage = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountResponse ¶
type AccountResponse struct {
Account Account `json:"account"`
}
type PageOptions ¶
type PaginationMeta ¶
type UserResponse ¶
type UserResponse struct {
Meta *PaginationMeta `json:"meta"`
Result []User `json:"users"`
}
type UserSingleResponse ¶
type UserSingleResponse struct {
Result User `json:"user"`
}
type VultrClient ¶
type VultrClient struct {
TokenSource oauth2.TokenSource
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(bearerToken string, httpClient ...*uhttp.BaseHttpClient) (*VultrClient, error)
func (*VultrClient) GetUserByID ¶
func (c *VultrClient) GetUserByID(ctx context.Context, userID string) (User, annotations.Annotations, error)
func (*VultrClient) ListAccountACLs ¶
func (c *VultrClient) ListAccountACLs(ctx context.Context) ([]string, annotations.Annotations, error)
func (*VultrClient) ListUsers ¶
func (c *VultrClient) ListUsers(ctx context.Context, options PageOptions) ([]User, string, annotations.Annotations, error)
Click to show internal directories.
Click to hide internal directories.