Documentation ¶
Index ¶
- Variables
- func LibraryVersion() string
- type BlueprintResponse
- type CreateBlueprintRequest
- type CreateSessionRequest
- type Nelson
- func (n *Nelson) CreateBlueprint(cbr CreateBlueprintRequest) error
- func (n *Nelson) CreateWebhook(owner string, repo string)
- func (n *Nelson) DeleteWebhook(owner string, repo string)
- func (n *Nelson) GetBlueprint(blueprintName string) (*BlueprintResponse, error)
- func (n *Nelson) GetBlueprints() ([]*BlueprintResponse, error)
- func (n *Nelson) GetRepos(owner string)
- func (n *Nelson) Login(githubToken string) error
- type NelsonConfig
- type NelsonSession
- type Repos
- type ReposHook
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &NelsonConfig{ Endpoint: "", Session: &NelsonSession{ Token: "", ExpiresAt: 0, }, }
Functions ¶
func LibraryVersion ¶
func LibraryVersion() string
Types ¶
type BlueprintResponse ¶
type CreateBlueprintRequest ¶
type CreateBlueprintRequest struct { // Example: gpu-general-deployment Name string `json:"name"` // Example: a blueprint for intensive graphics consumption Description string `json:"description"` // Sha256 sum of the template for versioning purposes Sha256 string `json:"sha256"` // Base64 Encoding of the blueprint template Template string `json:"template"` }
type CreateSessionRequest ¶
type CreateSessionRequest struct {
AccessToken string `json:"access_token"`
}
type Nelson ¶
type Nelson struct { Client *http.Client NelsonConfig *NelsonConfig // contains filtered or unexported fields }
Nelson is a data struct that contains an http client. This client will be used to make secure calls to the Nelson server.
func CreateNelson ¶
CreateNelson creates a client from a given config. In the config is the path to the .nelson/config.yml. We need that file to grab the token.
func (*Nelson) CreateBlueprint ¶
func (n *Nelson) CreateBlueprint(cbr CreateBlueprintRequest) error
func (*Nelson) CreateWebhook ¶
CreateWebhook puts a webhook on a repository to enable nelson on a given repository. https://nelson.local/v1/repos/getnelson/terraform-provider-nelson/hook
func (*Nelson) DeleteWebhook ¶
DeleteWebhook tells Nelson to delete a webhook on the repository.
func (*Nelson) GetBlueprint ¶
func (n *Nelson) GetBlueprint(blueprintName string) (*BlueprintResponse, error)
func (*Nelson) GetBlueprints ¶
func (n *Nelson) GetBlueprints() ([]*BlueprintResponse, error)
func (*Nelson) GetRepos ¶
GetRepos uses the http.Client in Nelson api struct to talk to the Nelson server https://nelson.local/v1/repos?owner=githubuser360
type NelsonConfig ¶
type NelsonConfig struct { Endpoint string `yaml:"endpoint"` Session *NelsonSession `yaml:"session"` }
type NelsonSession ¶
Click to show internal directories.
Click to hide internal directories.