api

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderGCPDeprecated = "google"
	ProviderGCP           = "gcp"
	ProviderAWS           = "aws"
	ProviderAzure         = "azure"
	TEST                  = "test"
)

Variables

This section is empty.

Functions

func GetErrorResponse

func GetErrorResponse(err error, methodName string) error

func NormalizeProvider

func NormalizeProvider(p string) string

func ToGQLClientProvider

func ToGQLClientProvider(p string) string

Types

type ApplyLock

type ApplyLock struct {
	Id   string
	Lock string
}

type Artifact

type Artifact struct {
	Id       string
	Name     string
	Readme   string
	Blob     string
	Sha      string
	Platform string
	Arch     string
	Filesize int
}

type Binding

type Binding struct {
	UserId  string
	GroupId string
}

type Chart

type Chart struct {
	Id            string
	Name          string
	Description   string
	LatestVersion string
	Dependencies  *Dependencies
}

type ChartInstallation

type ChartInstallation struct {
	Id           string
	Chart        *Chart
	Version      *Version
	Installation *Installation
}

type ChartName

type ChartName struct {
	Repo  string
	Chart string
}

type ChatMessage

type ChatMessage struct {
	Name    string
	Content string
	Role    string
}

type Client

type Client interface {
	Me() (*Me, error)
	LoginMethod(email string) (*LoginMethod, error)
	PollLoginToken(token string) (string, error)
	DeviceLogin() (*DeviceLogin, error)
	Login(email string, pwd string) (string, error)
	ImpersonateServiceAccount(email string) (string, string, error)
	CreateAccessToken() (string, error)
	GrabAccessToken() (string, error)
	ListKeys(emails []string) ([]*PublicKey, error)
	CreateKey(name string, content string) error
	GetEabCredential(cluster string, provider string) (*EabCredential, error)
	DeleteEabCredential(cluster string, provider string) error
	CreateEvent(event *UserEventAttributes) error
	GetTfProviders() ([]string, error)
	GetRepository(repo string) (*Repository, error)
	UpdateVersion(spec *VersionSpec, tags []string) error
	CreateDomain(name string) error
	CreateInstallation(id string) (string, error)
	GetInstallation(name string) (*Installation, error)
	OIDCProvider(id string, attributes *OidcProviderAttributes) error
	CreateKeyBackup(attrs KeyBackupAttributes) error
	GetKeyBackup(name string) (*KeyBackup, error)
	ListKeyBackups() ([]*KeyBackup, error)
	GetHelp(prompt string) (string, error)
	Clusters() ([]*Cluster, error)
	Cluster(id string) (*Cluster, error)
	Chat(history []*ChatMessage) (*ChatMessage, error)
	CreateTrust(issuer, trust string) error
	DeleteTrust(id string) error
	OidcToken(provider gqlclient.ExternalOidcProvider, token, email string) (string, error)
	GetConsoleInstances() ([]*gqlclient.ConsoleInstanceFragment, error)
	UpdateConsoleInstance(id string, attrs gqlclient.ConsoleInstanceUpdateAttributes) error
}

func FromConfig

func FromConfig(conf *config.Config) Client

func NewClient

func NewClient() Client

type Cluster

type Cluster struct {
	Id          string
	Name        string
	Provider    string
	UpgradeInfo []*UpgradeInfo
	Source      string
	GitUrl      string
	Owner       *User
}

type Condition

type Condition struct {
	Field     string
	Operation string
	Value     string
}

type ConfigurationItem

type ConfigurationItem struct {
	Name          string
	Default       string
	Documentation string
	Type          string
	Placeholder   string
	FunctionName  string `json:"functionName" yaml:"functionName"`
	Optional      bool
	Condition     *Condition
	Validation    *Validation
	Values        []string
}

type Crd

type Crd struct {
	Id   string
	Name string
	Blob string
}

type Dependencies

type Dependencies struct {
	Dependencies    []*Dependency
	Providers       []string
	Wirings         *Wirings
	Secrets         []string
	Application     bool
	Wait            bool
	ProviderWirings map[string]interface{}
	Outputs         map[string]interface{}
	ProviderVsn     string
	CliVsn          string
}

type Dependency

type Dependency struct {
	Type string
	Repo string
	Name string
}

type DeviceLogin

type DeviceLogin struct {
	LoginUrl    string
	DeviceToken string
}

type DnsDomain

type DnsDomain struct {
	Id   string
	Name string
}

type EabCredential

type EabCredential struct {
	Id       string
	KeyId    string
	HmacKey  string
	Cluster  string
	Provider string
}

type Group

type Group struct {
	Id   string
	Name string
}

type Installation

type Installation struct {
	Id           string
	Repository   *Repository
	User         *User
	OIDCProvider *OIDCProvider `json:"oidcProvider"`
	LicenseKey   string
	Context      map[string]interface{}
	AcmeKeyId    string
	AcmeSecret   string
}

type IntegrationInput

type IntegrationInput struct {
	Name        string
	Description string
	Icon        string
	SourceURL   string `json:"sourceUrl,omitempty"`
	Spec        string
	Type        string `json:"type,omitempty"`
	Tags        []Tag  `json:"tags,omitempty" yaml:"tags"`
}

type KeyBackup

type KeyBackup struct {
	Name         string
	Digest       string
	Repositories []string
	Value        string
	InsertedAt   string
}

type KeyBackupAttributes

type KeyBackupAttributes struct {
	Name         string
	Repositories []string
	Key          string
}

type LockAttributes

type LockAttributes struct {
	Lock string
}

type LoginMethod

type LoginMethod struct {
	LoginMethod string
	Token       string
}

type Me

type Me struct {
	Id                 string
	Email              string
	Demoing            bool
	TrustRelationships []*gqlclient.OidcTrustRelationshipFragment
}

type OAuthConfiguration

type OAuthConfiguration struct {
	Issuer                string
	AuthorizationEndpoint string
	TokenEndpoint         string
	JwksUri               string
	UserinfoEndpoint      string
}

type OIDCProvider

type OIDCProvider struct {
	Id            string
	ClientId      string
	ClientSecret  string
	RedirectUris  []string
	Bindings      []*ProviderBinding
	Configuration *OAuthConfiguration
}

type OIDCSettings

type OIDCSettings struct {
	DomainKey  string   `yaml:"domainKey"`
	UriFormat  string   `yaml:"uriFormat"`
	UriFormats []string `yaml:"uriFormats"`
	AuthMethod string   `yaml:"authMethod"`
	Subdomain  bool     `yaml:"subdomain"`
}

type OauthSettings

type OauthSettings struct {
	UriFormat  string `yaml:"uriFormat"`
	AuthMethod string `yaml:"authMethod"`
}

type OidcProviderAttributes

type OidcProviderAttributes struct {
	RedirectUris []string
	AuthMethod   string
	Bindings     []Binding
}

type PageInfo

type PageInfo struct {
	HasNextPage bool
	EndCursor   string
}

type ProviderBinding

type ProviderBinding struct {
	User  *User
	Group *Group
}

type PublicKey

type PublicKey struct {
	Id      string
	Content string
	User    *User
}

type PublicKeyEdge

type PublicKeyEdge struct {
	Node *PublicKey
}

type Publisher

type Publisher struct {
	Id   string
	Name string
}

type Recipe

type Recipe struct {
	Id                 string
	Name               string
	Provider           string
	Description        string
	Primary            bool
	Restricted         bool
	Tests              []*RecipeTest
	Repository         *Repository
	RecipeSections     []*RecipeSection
	OidcSettings       *OIDCSettings `yaml:"oidcSettings" json:"oidcSettings"`
	RecipeDependencies []*Recipe     `yaml:"recipeDependencies" json:"recipeDependencies"`
}

type RecipeItem

type RecipeItem struct {
	Id            string
	Terraform     *Terraform
	Chart         *Chart
	Configuration []*ConfigurationItem
}

type RecipeSection

type RecipeSection struct {
	Id            string
	Repository    *Repository
	RecipeItems   []*RecipeItem
	Configuration []*ConfigurationItem
}

type RecipeTest

type RecipeTest struct {
	Name    string
	Type    string
	Message string
	Args    []*TestArgument
}

type Repository

type Repository struct {
	Id          string
	Name        string
	Description string
	Icon        string
	DarkIcon    string
	Notes       string
	Publisher   *Publisher
	Recipes     []*Recipe
}

type RepositoryInput

type RepositoryInput struct {
	Name          string
	Description   string
	ReleaseStatus string `json:"releaseStatus,omitempty" yaml:"releaseStatus,omitempty"`
	Private       bool   `json:"private" yaml:"private,omitempty"`
	Tags          []Tag  `json:"tags,omitempty" yaml:"tags"`
	Icon          string `json:"icon,omitempty" yaml:"icon"`
	DarkIcon      string `json:"darkIcon,omitempty" yaml:"darkIcon"`
	Docs          string `json:"docs,omitempty" yaml:"docs"`
	Contributors  []string
	Category      string
	Notes         string         `json:"notes,omitempty" yaml:"notes"`
	GitUrl        string         `json:"gitUrl" yaml:"gitUrl"`
	Homepage      string         `json:"homepage" yaml:"homepage"`
	OauthSettings *OauthSettings `yaml:"oauthSettings,omitempty"`
}

type ResourceDefinitionInput

type ResourceDefinitionInput struct {
	Name string
	Spec []Specification
}

type ScaffoldFile

type ScaffoldFile struct {
	Path    string
	Content string
}

type ScaffoldInputs

type ScaffoldInputs struct {
	Application string `survey:"application"`
	Publisher   string `survey:"publisher"`
	Category    string `survey:"category"`
	Ingress     bool   `survey:"ingress"`
	Postgres    bool   `survey:"postgres"`
}

type Specification

type Specification struct {
	Name     string
	Type     string
	Inner    string `json:"inner,omitempty"`
	Required bool
	Spec     []Specification `json:"spec,omitempty"`
}

type Tag

type Tag struct {
	Tag string
}

type TagAttributes

type TagAttributes struct {
	Tag string
}

type Terraform

type Terraform struct {
	Id             string
	Name           string
	Description    string
	ValuesTemplate string
	Dependencies   *Dependencies
	Package        string
}

type TestArgument

type TestArgument struct {
	Name string
	Repo string
	Key  string
}

type Token

type Token struct {
	Token string
}

type Upgrade

type Upgrade struct {
	Id string
}

type UpgradeInfo

type UpgradeInfo struct {
	Count        int64
	Installation *Installation
}

type User

type User struct {
	Id    string
	Email string
	Name  string
}

type UserEventAttributes

type UserEventAttributes struct {
	Event  string
	Data   string
	Status string
}

type Validation

type Validation struct {
	Type    string
	Regex   string
	Message string
}

type Version

type Version struct {
	Id             string
	Version        string
	Readme         string
	Helm           map[string]interface{}
	Package        string
	ValuesTemplate string
	TemplateType   gqlclient.TemplateType
	Crds           []Crd
	Dependencies   *Dependencies
	InsertedAt     string
}

type VersionAttributes

type VersionAttributes struct {
	Tags []*TagAttributes
}

type VersionSpec

type VersionSpec struct {
	Repository string
	Chart      *string
	Terraform  *string
	Version    string
}

type Webhook

type Webhook struct {
	Id     string
	Url    string
	Secret string
}

type Wirings

type Wirings struct {
	Terraform map[string]string
	Helm      map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳