api2

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Massdriver GraphQL API queries/mutations using Genqlient

Manages credential-type artifacts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(apiKey string) graphql.Client

Types

type Artifact

type Artifact struct {
	Name string
	ID   string
}

func ListCredentials

func ListCredentials(client graphql.Client, orgID string, artifacType string) ([]Artifact, error)

Get the first page of credentials for an artifact type

type ArtifactDefinition

type ArtifactDefinition struct {
	Name string
}

func ListCredentialTypes

func ListCredentialTypes() []ArtifactDefinition

List supported credential types

type ContainerRepository added in v0.5.2

type ContainerRepository struct {
	Token         string
	RepositoryUri string
}

func GetContainerRepository added in v0.5.2

func GetContainerRepository(client graphql.Client, artifactID, orgID, imageName, location string) (*ContainerRepository, error)

type ContainerRepositoryInput added in v0.5.2

type ContainerRepositoryInput struct {
	Location  string `json:"location"`
	ImageName string `json:"imageName"`
}

Arguments required to get container repositories

func (*ContainerRepositoryInput) GetImageName added in v0.5.2

func (v *ContainerRepositoryInput) GetImageName() string

GetImageName returns ContainerRepositoryInput.ImageName, and is useful for accessing the field via an interface.

func (*ContainerRepositoryInput) GetLocation added in v0.5.2

func (v *ContainerRepositoryInput) GetLocation() string

GetLocation returns ContainerRepositoryInput.Location, and is useful for accessing the field via an interface.

type Credential

type Credential struct {
	ArtifactDefinitionType string `json:"artifactDefinitionType"`
	ArtifactId             string `json:"artifactId"`
}

func (*Credential) GetArtifactDefinitionType

func (v *Credential) GetArtifactDefinitionType() string

GetArtifactDefinitionType returns Credential.ArtifactDefinitionType, and is useful for accessing the field via an interface.

func (*Credential) GetArtifactId

func (v *Credential) GetArtifactId() string

GetArtifactId returns Credential.ArtifactId, and is useful for accessing the field via an interface.

type Deployment

type Deployment struct {
	ID     string
	Status string
}

func GetDeployment

func GetDeployment(client graphql.Client, orgID string, id string) (Deployment, error)

type Environment

type Environment struct {
	ID      string
	Slug    string
	Project Project
}

func DecommissionPreviewEnvironment added in v0.5.9

func DecommissionPreviewEnvironment(client graphql.Client, orgID string, targetID string) (Environment, error)

func DeployPreviewEnvironment

func DeployPreviewEnvironment(client graphql.Client, orgID string, projectID string, credentials []Credential, packageParams map[string]interface{}, ciContext map[string]interface{}) (Environment, error)

type PreviewEnvironmentInput

type PreviewEnvironmentInput struct {
	Credentials []Credential `json:"credentials"`
	// GitHub Action event payload.
	CiContext     map[string]interface{} `json:"-"`
	PackageParams map[string]interface{} `json:"-"`
}

func (*PreviewEnvironmentInput) GetCiContext

func (v *PreviewEnvironmentInput) GetCiContext() map[string]interface{}

GetCiContext returns PreviewEnvironmentInput.CiContext, and is useful for accessing the field via an interface.

func (*PreviewEnvironmentInput) GetCredentials

func (v *PreviewEnvironmentInput) GetCredentials() []Credential

GetCredentials returns PreviewEnvironmentInput.Credentials, and is useful for accessing the field via an interface.

func (*PreviewEnvironmentInput) GetPackageParams

func (v *PreviewEnvironmentInput) GetPackageParams() map[string]interface{}

GetPackageParams returns PreviewEnvironmentInput.PackageParams, and is useful for accessing the field via an interface.

func (*PreviewEnvironmentInput) MarshalJSON

func (v *PreviewEnvironmentInput) MarshalJSON() ([]byte, error)

func (*PreviewEnvironmentInput) UnmarshalJSON

func (v *PreviewEnvironmentInput) UnmarshalJSON(b []byte) error

type Project

type Project struct {
	ID            string
	Slug          string
	DefaultParams map[string]interface{}
}

func GetProject

func GetProject(client graphql.Client, orgID string, idOrSlug string) (Project, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL