resources

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ServiceAccountBasic = "client_secret_basic"
	ServiceAccountJWT   = "private_key_jwt"

	ServiceAccountRoleGuest        = ServiceAccountRole("guest")
	ServiceAccountRoleReporter     = ServiceAccountRole("reporter")
	ServiceAccountRoleDeveloper    = ServiceAccountRole("developer")
	ServiceAccountRoleMaintainer   = ServiceAccountRole("maintainer")
	ServiceAccountRoleProjectAdmin = ServiceAccountRole("project-admin")
	ServiceAccountRoleCompanyOwner = ServiceAccountRole("company-owner")
)

Variables

This section is empty.

Functions

func EncodeResourceToJSON

func EncodeResourceToJSON(obj interface{}) ([]byte, error)

func IsValidServiceAccountRole

func IsValidServiceAccountRole(role ServiceAccountRole) bool

Types

type APIError

type APIError struct {
	StatusCode int    `json:"statusCode"`
	Message    string `json:"message"`
}

type AuthProvider

type AuthProvider struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Type  string `json:"type"`
}

type Cluster

type Cluster struct {
	ID           string `json:"_id"`       //nolint:tagliatelle
	DisplayName  string `json:"clusterId"` //nolint:tagliatelle
	Description  string `json:"description"`
	Distribution string `json:"distribution"`
	Vendor       string `json:"vendor"`
}

type Company

type Company struct {
	ID         string     `json:"_id"` //nolint:tagliatelle
	Name       string     `json:"name"`
	TenantID   string     `json:"tenantId"`
	Pipelines  Pipelines  `json:"pipelines"`
	Repository Repository `json:"repository"`
}

type CreateJob added in v0.8.0

type CreateJob struct {
	JobName string `json:"jobName"`
}

type CreateJobRequest added in v0.8.0

type CreateJobRequest struct {
	From         string `json:"from"`
	ResourceName string `json:"resourceName"`
}

type CronJob added in v0.8.0

type CronJob struct {
	Name         string    `json:"name"`
	Active       int       `json:"active"`
	Suspend      bool      `json:"suspend"`
	Schedule     string    `json:"schedule"`
	Age          time.Time `json:"creationTimestamp"` //nolint: tagliatelle
	LastSchedule time.Time `json:"lastScheduleTime"`  //nolint: tagliatelle
}

type DeployProject

type DeployProject struct {
	ID  int    `json:"id"`
	URL string `json:"url"`
}

type DeployProjectRequest

type DeployProjectRequest struct {
	Environment string `json:"environment"`
	Revision    string `json:"revision"`
	Type        string `json:"deployType"`              //nolint: tagliatelle
	ForceDeploy bool   `json:"forceDeplpuWhenNoSemver"` //nolint: tagliatelle
}

type Deployment added in v0.8.0

type Deployment struct {
	Name      string    `json:"name"`
	Available int       `json:"available"`
	Ready     int       `json:"ready"`
	Replicas  int       `json:"replicas"`
	Age       time.Time `json:"creationTimestamp"` //nolint: tagliatelle
}

type Environment

type Environment struct {
	DisplayName  string         `json:"label"` //nolint:tagliatelle
	EnvID        string         `json:"envId"`
	Cluster      ProjectCluster `json:"cluster"`
	IsProduction bool           `json:"isProduction"`
}

type JWTServiceAccountJSON added in v0.7.0

type JWTServiceAccountJSON struct {
	Type           string `json:"type"`
	KeyID          string `json:"key-id"`           //nolint: tagliatelle
	PrivateKeyData string `json:"private-key-data"` //nolint: tagliatelle
	ClientID       string `json:"client-id"`        //nolint: tagliatelle
}

type JWTTokenRequest

type JWTTokenRequest struct {
	Code  string `json:"code"`
	State string `json:"state"`
}

type Job added in v0.8.0

type Job struct {
	Name           string    `json:"name"`
	Active         int       `json:"active"`
	Failed         int       `json:"failed"`
	Succeeded      int       `json:"succeeded"`
	Age            time.Time `json:"creationTimestamp"` //nolint: tagliatelle
	StartTime      time.Time `json:"startTime"`
	CompletionTime time.Time `json:"completionTime"`
}

type MarketplaceItem added in v0.8.0

type MarketplaceItem struct {
	ID          string `json:"_id"` //nolint:tagliatelle
	ItemID      string `json:"itemId"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	SupportedBy string `json:"supportedBy"`
}

type PipelineStatus

type PipelineStatus struct {
	ID     int    `json:"id"`
	Status string `json:"status"`
}

type Pipelines

type Pipelines struct {
	Type string `json:"type"`
}

type Pod added in v0.8.0

type Pod struct {
	Name      string    `json:"name"`
	Phase     string    `json:"phase"`
	Status    string    `json:"status"`
	Age       time.Time `json:"startTime"` //nolint:tagliatelle
	Component []struct {
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"component"`
	Containers []struct {
		Name         string `json:"name"`
		Ready        bool   `json:"ready"`
		RestartCount int    `json:"restartCount"`
		Status       string `json:"status"`
	} `json:"containers"`
}

type Port added in v0.8.0

type Port struct {
	Name       string `json:"name"`
	Port       int    `json:"port"`
	Protocol   string `json:"protocol"`
	TargetPort string `json:"targetPort"`
}

type Project

type Project struct {
	ID                   string        `json:"_id"` //nolint:tagliatelle
	Name                 string        `json:"name"`
	ConfigurationGitPath string        `json:"configurationGitPath"`
	Environments         []Environment `json:"environments"`
	ProjectID            string        `json:"projectId"`
	Pipelines            Pipelines     `json:"pipelines"`
	CompanyID            string        `json:"tenantId"` //nolint:tagliatelle
}

type ProjectCluster added in v0.8.0

type ProjectCluster struct {
	ID        string `json:"clusterId"` //nolint:tagliatelle
	Namespace string `json:"namespace"`
}

type PublicKey added in v0.7.0

type PublicKey struct {
	Type      string `json:"kty"` //nolint: tagliatelle
	Use       string `json:"use"` //nolint: tagliatelle
	Algorithm string `json:"alg"` //nolint: tagliatelle
	KeyID     string `json:"kid"` //nolint: tagliatelle
	Modulus   string `json:"n"`   //nolint: tagliatelle
	Exponent  string `json:"e"`   //nolint: tagliatelle
}

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `json:"refreshToken"`
}

type Repository

type Repository struct {
	Type string `json:"type"`
}

type RuntimeEvent added in v0.8.0

type RuntimeEvent struct {
	Type      string    `json:"type"`
	Object    string    `json:"subObjectPath"` //nolint: tagliatelle
	Message   string    `json:"message"`
	Reason    string    `json:"reason"`
	FirstSeen time.Time `json:"firstSeen"`
	LastSeen  time.Time `json:"lastSeen"`
}

func (*RuntimeEvent) UnmarshalJSON added in v0.8.0

func (re *RuntimeEvent) UnmarshalJSON(data []byte) error

type Service added in v0.8.0

type Service struct {
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	ClusterIP string    `json:"clusterIP"` //nolint: tagliatelle
	Ports     []Port    `json:"ports"`
	Age       time.Time `json:"creationTimestamp"` //nolint: tagliatelle
}

type ServiceAccount added in v0.7.0

type ServiceAccount struct {
	ClientID         string `json:"clientId"`
	ClientSecret     string `json:"clientSecret"`
	ClientIDIssuedAt int64  `json:"clientIdIssuedAt"`
	Company          string `json:"company"`
}

type ServiceAccountRequest

type ServiceAccountRequest struct {
	Name      string             `json:"name"`
	Type      string             `json:"tokenEndpointAuthMethod"` //nolint: tagliatelle
	Role      ServiceAccountRole `json:"role"`
	PublicKey PublicKey          `json:"publicKey,omitempty"`
}

type ServiceAccountRole

type ServiceAccountRole string

func (ServiceAccountRole) String

func (role ServiceAccountRole) String() string

type UserToken

type UserToken struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
	ExpiresAt    int64  `json:"expiresAt"`
}

func (*UserToken) JWTToken

func (ut *UserToken) JWTToken() *oauth2.Token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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