Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( AuthConfigGetRequest = `` /* 169-byte string literal not displayed */ DeploymentCreateRequest = `` /* 328-byte string literal not displayed */ DeploymentDeleteRequest = `` /* 248-byte string literal not displayed */ DeploymentsGetRequest = `` /* 369-byte string literal not displayed */ DeploymentUpdateRequest = `` /* 271-byte string literal not displayed */ ServiceAccountCreateRequest = `` /* 395-byte string literal not displayed */ ServiceAccountDeleteRequest = `` /* 271-byte string literal not displayed */ ServiceAccountsGetRequest = `` /* 352-byte string literal not displayed */ TokenBasicCreateRequest = `` /* 248-byte string literal not displayed */ UserCreateRequest = `` /* 330-byte string literal not displayed */ UserGetAllRequest = `` /* 294-byte string literal not displayed */ WorkspacesGetRequest = `` /* 246-byte string literal not displayed */ WorkspaceCreateRequest = `` /* 212-byte string literal not displayed */ WorkspaceDeleteRequest = `` /* 177-byte string literal not displayed */ WorkspaceUpdateRequest = `` /* 232-byte string literal not displayed */ WorkspaceUserAddRequest = `` /* 249-byte string literal not displayed */ WorkspaceUserRemoveRequest = `` /* 323-byte string literal not displayed */ )
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶ added in v0.2.0
type AuthConfig struct {
LocalEnabled bool `json:"localEnabled"`
GoogleEnabled bool `json:"googleEnabled"`
GithubEnabled bool `json:"githubEnabled"`
Auth0Enabled bool `json:"auth0Enabled"`
}
AuthConfig holds data related to oAuth and basic authentication
type Client ¶
type Client struct {
HTTPClient *httputil.HTTPClient
}
Client containers the logger and HTTPClient used to communicate with the HoustonAPI
func NewHoustonClient ¶
func NewHoustonClient(c *httputil.HTTPClient) *Client
NewHoustonClient returns a new Client with the logger and HTTP client setup.
type Decoded ¶
type Decoded struct {
ID string `json:"id"`
SU bool `json:"sU"`
Iat int `json:"iat"`
Exp int `json:"exp"`
}
Decoded defines structure of a houston response Decoded object
type Deployment ¶
type Deployment struct {
Id string `json:"uuid"`
Type string `json:"type"`
Label string `json:"label"`
ReleaseName string `json:"releaseName"`
Version string `json:"version"`
DeploymentInfo DeploymentInfo `json:"deployInfo"`
Workspace Workspace `json:"workspace"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
Deployment defines structure of a houston response Deployment object
type DeploymentInfo ¶ added in v0.2.0
DeploymentInfo contains registry related information for a deployment
type Email ¶ added in v0.2.0
type Email struct {
Address string `json:"address"`
Verified bool `json:"verified"`
Primary bool `json:"primary"`
}
Email contains various pieces of a users email
type GraphQLQuery ¶
type GraphQLQuery struct {
Query string `json:"query"`
}
GraphQLQuery wraps a graphql query string
type HoustonResponse ¶
type HoustonResponse struct {
Data struct {
AddWorkspaceUser *Workspace `json:"workspaceAddUser,omitempty"`
RemoveWorkspaceUser *Workspace `json:"workspaceRemoveUser,omitempty"`
CreateDeployment *Deployment `json:"createDeployment,omitempty"`
CreateToken *AuthUser `json:"createToken,omitempty"`
CreateServiceAccount *ServiceAccount `json:"createServiceAccount,omitempty"`
CreateUser *AuthUser `json:"createUser,omitempty"`
CreateWorkspace *Workspace `json:"createWorkspace,omitempty"`
DeleteDeployment *Deployment `json:"deleteDeployment,omitempty"`
DeleteServiceAccount *ServiceAccount `json:"deleteServiceAccount,omitempty"`
DeleteWorkspace *Workspace `json:"deleteWorkspace,omitempty"`
GetDeployments []Deployment `json:"deployments,omitempty"`
GetAuthConfig *AuthConfig `json:"authConfig,omitempty"`
GetServiceAccounts []ServiceAccount `json:"serviceAccounts,omitempty"`
GetUsers []User `json:"users,omitempty"`
GetWorkspaces []Workspace `json:"workspaces,omitempty"`
UpdateDeployment *Deployment `json:"updateDeployment,omitempty"`
UpdateWorkspace *Workspace `json:"updateWorkspace,omitempty"`
} `json:"data"`
Errors []Error `json:"errors,omitempty"`
}
HoustonResponse wraps all houston response structs used for json marashalling
type Request ¶ added in v0.7.0
type Request struct {
Query string `json:"query"`
Variables map[string]interface{} `json:"variables"`
}
func (*Request) Do ¶ added in v0.7.0
func (r *Request) Do() (*HoustonResponse, error)
Do (request) is a wrapper to more easily pass variables to a client.Do request
type ServiceAccount ¶ added in v0.6.0
type ServiceAccount struct {
Uuid string `json:"uuid"`
ApiKey string `json:"apiKey"`
Label string `json:"label"`
Category string `json:"category"`
EntityType string `json:"entityType"`
EntityUuid string `json:"entityUuid"`
LastUsedAt string `json:"lastUsedAt"`
Active bool `json:"active"`
}
ServiceACcount defines a structure of a ServiceAccountResponse object
type Status ¶ added in v0.2.0
type Status struct {
Success bool `json:"success"`
Message string `json:"message"`
Code string `json:"code"`
Id string `json:"id"`
}
Status defines structure of a houston response StatusResponse object
type Token ¶
type Token struct {
Value string `json:"value"`
Payload TokenPayload `json:"payload"`
}
Token contains a houston auth token as well as it's payload of components
type TokenPayload ¶ added in v0.2.0
TokenPayload contains components of a houston auth token
type User ¶ added in v0.2.0
type User struct {
Uuid string `json:"uuid"`
Emails []Email `json:"emails"`
Username string `json:"username"`
Status string `json:"status"`
}
User contains all components of an Astronomer user
type Workspace ¶ added in v0.2.0
type Workspace struct {
Uuid string `json:"uuid"`
Label string `json:"label"`
Description string `json:"description"`
Active bool `json:"active"`
Users []User `json:"users"`
// groups
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
Workspace contains all components of an Astronomer Workspace