Documentation ¶
Index ¶
- func ErrorStatus(err error) int
- type Client
- func (c *Client) CreateDatabase(ctx context.Context, name string) error
- func (c *Client) CreateUser(ctx context.Context, name, password string, superuser bool) error
- func (c *Client) DatabaseExists(ctx context.Context, name string) (bool, error)
- func (c *Client) DeleteDatabase(ctx context.Context, name string) error
- func (c Client) DeleteUser(ctx context.Context, name string) error
- func (c *Client) Do(ctx context.Context, method, path string, in, out interface{}) error
- func (c *Client) ListDatabases(ctx context.Context) ([]PostgresDatabase, error)
- func (c *Client) ListUsers(ctx context.Context) ([]PostgresUser, error)
- func (c *Client) NewRequest(path string, method string, in interface{}) (*http.Request, error)
- func (c *Client) UserExists(ctx context.Context, name string) (bool, error)
- type CommandResponse
- type CreateDatabaseRequest
- type CreateUserRequest
- type DatabaseListResponse
- type DeleteDatabaseRequest
- type DeleteUserRequest
- type Error
- type FindDatabaseResponse
- type FindUserResponse
- type GrantAccessRequest
- type PostgresDatabase
- type PostgresUser
- type RevokeAccessRequest
- type UserListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorStatus ¶
Types ¶
type Client ¶
type Client struct { BaseURL string // contains filtered or unexported fields }
func (*Client) CreateDatabase ¶
func (*Client) CreateUser ¶
func (*Client) DatabaseExists ¶
func (*Client) DeleteDatabase ¶
func (*Client) ListDatabases ¶
func (c *Client) ListDatabases(ctx context.Context) ([]PostgresDatabase, error)
func (*Client) NewRequest ¶
type CommandResponse ¶
type CreateDatabaseRequest ¶
type CreateDatabaseRequest struct {
Name string `json:"name"`
}
type CreateUserRequest ¶
type DatabaseListResponse ¶
type DatabaseListResponse struct {
Result []PostgresDatabase
}
type DeleteDatabaseRequest ¶
type DeleteDatabaseRequest struct {
Name string `json:"name"`
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Username string `json:"username"`
}
type FindDatabaseResponse ¶
type FindDatabaseResponse struct {
Result PostgresDatabase
}
type FindUserResponse ¶
type FindUserResponse struct {
Result PostgresUser
}
type GrantAccessRequest ¶
type PostgresDatabase ¶
type PostgresUser ¶
type RevokeAccessRequest ¶
type UserListResponse ¶
type UserListResponse struct {
Result []PostgresUser
}
Click to show internal directories.
Click to hide internal directories.