Documentation ¶
Index ¶
- Constants
- Variables
- type APIRequestMetadata
- type APIVerb
- type APIVerbGroup
- type AWSIntegration
- type BasicIntegration
- type CLILoginExchangeRequest
- type CLILoginExchangeResponse
- type CLILoginUserRequest
- type Cluster
- type ClusterCandidate
- type ClusterGetResponse
- type ClusterResolver
- type ClusterResolverAll
- type ClusterResolverData
- type ClusterResolverInfo
- type ClusterResolverName
- type ClusterService
- type Collaborator
- type ConfigMapInput
- type CreateAWSRequest
- type CreateAWSResponse
- type CreateAddonRequest
- type CreateBasicRequest
- type CreateBasicResponse
- type CreateClusterCandidateRequest
- type CreateClusterCandidateResponse
- type CreateClusterManualRequest
- type CreateConfigMapRequest
- type CreateConfigMapResponse
- type CreateDOCRInfraRequest
- type CreateDOKSInfraRequest
- type CreateECRInfraRequest
- type CreateEKSInfraRequest
- type CreateGCPRequest
- type CreateGCPResponse
- type CreateGCRInfraRequest
- type CreateGKEInfraRequest
- type CreateGitActionConfigRequest
- type CreateInviteRequest
- type CreateInviteResponse
- type CreateNamespaceRequest
- type CreateNamespaceResponse
- type CreateProjectRequest
- type CreateProjectResponse
- type CreateProjectRoleRequest
- type CreateRegistryRepositoryRequest
- type CreateRegistryRequest
- type CreateReleaseBaseRequest
- type CreateReleaseRequest
- type CreateUserRequest
- type CreateUserResponse
- type DNSRecord
- type DeleteConfigMapRequest
- type DeleteInfraRequest
- type DeleteNamespaceRequest
- type DeleteProjectRequest
- type DeleteProjectResponse
- type DeleteRoleRequest
- type DeleteRoleResponse
- type EventStatus
- type ExternalError
- type FinalizeResetUserPasswordRequest
- type FormContent
- type FormContext
- type FormSection
- type FormTab
- type FormYAML
- type GCPIntegration
- type GetAuthenticatedUserResponse
- type GetBuildpackRequest
- type GetBuildpackResponse
- type GetConfigMapRequest
- type GetConfigMapResponse
- type GetContentsRequest
- type GetContentsResponse
- type GetGHATemplateRequest
- type GetGHATemplateResponse
- type GetGitInstallationResponse
- type GetGithubAppAccountsResponse
- type GetHelmRepoResponse
- type GetInviteResponse
- type GetJobsResponse
- type GetJobsStatusResponse
- type GetNotificationConfigResponse
- type GetPodMetricsRequest
- type GetPodMetricsResponse
- type GetPodsRequest
- type GetProcfileRequest
- type GetProcfileResponse
- type GetProjectPolicyResponse
- type GetRegistryDOCRTokenRequest
- type GetRegistryECRTokenRequest
- type GetRegistryGCRTokenRequest
- type GetRegistryTokenResponse
- type GetReleaseAllPodsResponse
- type GetReleaseResponse
- type GetReleaseStepsResponse
- type GetTarballURLResponse
- type GetTemplateRequest
- type GetTemplateResponse
- type GetTemplateUpgradeNotesRequest
- type GetTemplateUpgradeNotesResponse
- type GetTemporaryKubeconfigResponse
- type GitActionConfig
- type GitInstallation
- type GithubDirectoryItem
- type GithubDirectoryRequest
- type HTTPVerb
- type HelmRepo
- type Image
- type Infra
- type InfraKind
- type InfraStatus
- type InitiateResetUserPasswordRequest
- type Invite
- type ListClusterCandidateResponse
- type ListClusterResponse
- type ListCollaboratorsResponse
- type ListConfigMapsResponse
- type ListGitInstallationIDsResponse
- type ListImageResponse
- type ListInvitesResponse
- type ListNGINXIngressesResponse
- type ListNamespacesResponse
- type ListOAuthResponse
- type ListProjectInfraResponse
- type ListProjectRolesResponse
- type ListProjectsRequest
- type ListProjectsResponse
- type ListRegistryRepositoryResponse
- type ListReleasesRequest
- type ListReleasesResponse
- type ListRepoBranchesResponse
- type ListReposResponse
- type ListSlackIntegrationsResponse
- type ListTemplatesRequest
- type ListTemplatesResponse
- type ListUserProjectsResponse
- type LoginUserRequest
- type LoginUserResponse
- type NameOrUInt
- type NotificationConfig
- type OAuthIntegration
- type OAuthIntegrationClient
- type OverwriteAWSRequest
- type OverwriteAWSResponse
- type Path
- type PermissionScope
- type Policy
- type PolicyDocument
- type PorterIntegration
- type PorterRelease
- type PorterTemplateSimple
- type Project
- type ReadProjectResponse
- type Registry
- type RegistryListResponse
- type RegistryRepository
- type RegistryService
- type Release
- type ReleaseListFilter
- type RenameConfigMapRequest
- type RenameConfigMapResponse
- type Repo
- type RequestAction
- type Role
- type RoleKind
- type RollbackReleaseRequest
- type ScopeTree
- type SlackIntegration
- type StreamHelmReleaseRequest
- type StreamStatusRequest
- type SubEvent
- type TemplateGetBaseRequest
- type URLParam
- type UpdateClusterRequest
- type UpdateConfigMapRequest
- type UpdateConfigMapResponse
- type UpdateImageBatchRequest
- type UpdateInviteRoleRequest
- type UpdateNotificationConfigRequest
- type UpdateRegistryRequest
- type UpdateReleaseStepsRequest
- type UpdateRoleRequest
- type UpdateRoleResponse
- type UpgradeReleaseRequest
- type User
- type VerifyEmailFinalizeRequest
- type VerifyResetUserPasswordRequest
- type VerifyTokenFinalizeRequest
- type WebhookRequest
Constants ¶
const ( EventStatusSuccess EventStatus = 1 EventStatusInProgress = 2 EventStatusFailed = 3 )
const RequestScopeCtxKey = "requestscopes"
const (
URLParamInviteToken = "token"
)
const (
URLParamSlackIntegrationID = "slack_integration_id"
)
Variables ¶
var AdminPolicy = []*PolicyDocument{ { Scope: ProjectScope, Verbs: ReadWriteVerbGroup(), }, }
var ClusterResolverInfos = map[ClusterResolverName]ClusterResolverInfo{
ClusterCAData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "cluster_ca_data",
},
ClusterLocalhost: {
Docs: "https://github.com/porter-dev/porter",
Fields: "cluster_hostname",
},
ClientCertData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "client_cert_data",
},
ClientKeyData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "client_key_data",
},
OIDCIssuerData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "oidc_idp_issuer_ca_data",
},
TokenData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "token_data",
},
GCPKeyData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "gcp_key_data",
},
AWSData: {
Docs: "https://github.com/porter-dev/porter",
Fields: "aws_access_key_id,aws_secret_access_key,aws_cluster_id",
},
}
ClusterResolverInfos is a map of the information for actions to be performed in order to initialize a cluster
var DeveloperPolicy = []*PolicyDocument{ { Scope: ProjectScope, Verbs: ReadWriteVerbGroup(), Children: map[PermissionScope]*PolicyDocument{ SettingsScope: { Scope: SettingsScope, Verbs: ReadVerbGroup(), }, }, }, }
var PorterClusterIntegrations = []PorterIntegration{ { AuthMechanism: "gcp", Category: "cluster", Service: string(GKE), }, { AuthMechanism: "aws", Category: "cluster", Service: string(EKS), }, { AuthMechanism: "kube", Category: "cluster", Service: string(Kube), }, }
PorterClusterIntegrations are the supported cluster integrations
var PorterHelmRepoIntegrations = []PorterIntegration{
{
AuthMechanism: "basic",
Category: "helm",
Service: "helmrepo",
},
}
PorterHelmRepoIntegrations are the supported helm repo integrations
var PorterRegistryIntegrations = []PorterIntegration{ { AuthMechanism: "gcp", Category: "registry", Service: string(GCR), }, { AuthMechanism: "aws", Category: "registry", Service: string(ECR), }, { AuthMechanism: "basic", Category: "registry", Service: string(DockerHub), }, }
PorterRegistryIntegrations are the supported registry integrations
var ScopeHeirarchy = ScopeTree{ ProjectScope: { ClusterScope: { NamespaceScope: { ReleaseScope: {}, }, }, RegistryScope: {}, HelmRepoScope: {}, GitInstallationScope: {}, InfraScope: {}, SettingsScope: {}, }, }
ScopeHeirarchy describes the tree of scopes, i.e. Cluster, Registry, and Settings
are children of Project, Namespace is a child of Cluster, etc.
var ViewerPolicy = []*PolicyDocument{ { Scope: ProjectScope, Verbs: ReadVerbGroup(), Children: map[PermissionScope]*PolicyDocument{ SettingsScope: { Scope: SettingsScope, Verbs: []APIVerb{}, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type APIRequestMetadata ¶ added in v0.10.0
type APIVerbGroup ¶
type APIVerbGroup []APIVerb
func ReadVerbGroup ¶
func ReadVerbGroup() APIVerbGroup
func ReadWriteVerbGroup ¶
func ReadWriteVerbGroup() APIVerbGroup
type AWSIntegration ¶ added in v0.10.0
type BasicIntegration ¶ added in v0.10.0
type CLILoginExchangeRequest ¶ added in v0.10.0
type CLILoginExchangeRequest struct {
AuthorizationCode string `json:"authorization_code" form:"required"`
}
type CLILoginExchangeResponse ¶ added in v0.10.0
type CLILoginExchangeResponse struct {
Token string `json:"token" form:"required"`
}
type CLILoginUserRequest ¶ added in v0.10.0
type CLILoginUserRequest struct {
Redirect string `schema:"redirect" form:"required"`
}
type Cluster ¶ added in v0.10.0
type Cluster struct { ID uint `json:"id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` // Name of the cluster Name string `json:"name"` // Server endpoint for the cluster Server string `json:"server"` // The integration service for this cluster Service ClusterService `json:"service"` // The infra id, if cluster was provisioned with Porter InfraID uint `json:"infra_id"` // (optional) The aws integration id, if available AWSIntegrationID uint `json:"aws_integration_id"` }
type ClusterCandidate ¶ added in v0.10.0
type ClusterCandidate struct { ID uint `json:"id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` // CreatedClusterID is the ID of the cluster that's eventually // created CreatedClusterID uint `json:"created_cluster_id"` // Name of the cluster Name string `json:"name"` // Server endpoint for the cluster Server string `json:"server"` // Name of the context that this was created from, if it exists ContextName string `json:"context_name"` // Resolvers are the list of resolvers: once all resolvers are "resolved," the // cluster will be created Resolvers []ClusterResolver `json:"resolvers"` // The best-guess for the AWSClusterID, which is required by aws auth mechanisms // See https://github.com/kubernetes-sigs/aws-iam-authenticator#what-is-a-cluster-id AWSClusterIDGuess string `json:"aws_cluster_id_guess"` }
type ClusterGetResponse ¶ added in v0.10.0
type ClusterResolver ¶ added in v0.10.0
type ClusterResolver struct { ID uint `json:"id"` // The ClusterCandidate that this is resolving ClusterCandidateID uint `json:"cluster_candidate_id"` // One of the ClusterResolverNames Name ClusterResolverName `json:"name"` // Resolved is true if this has been resolved, false otherwise Resolved bool `json:"resolved"` // Docs is a link to documentation that helps resolve this manually Docs string `json:"docs"` // Fields is a list of fields that must be sent with the resolving request Fields string `json:"fields"` // Data is additional data for resolving the action, for example a file name, // context name, etc Data ClusterResolverData `json:"data,omitempty"` }
type ClusterResolverAll ¶ added in v0.10.0
type ClusterResolverAll struct { ClusterCAData string `json:"cluster_ca_data,omitempty"` ClusterHostname string `json:"cluster_hostname,omitempty"` ClientCertData string `json:"client_cert_data,omitempty"` ClientKeyData string `json:"client_key_data,omitempty"` OIDCIssuerCAData string `json:"oidc_idp_issuer_ca_data,omitempty"` TokenData string `json:"token_data,omitempty"` GCPKeyData string `json:"gcp_key_data,omitempty"` AWSAccessKeyID string `json:"aws_access_key_id"` AWSSecretAccessKey string `json:"aws_secret_access_key"` AWSClusterID string `json:"aws_cluster_id"` }
ClusterResolverAll is a helper type that contains the fields for all possible resolvers, so that raw bytes can be unmarshaled in a single read
type ClusterResolverData ¶ added in v0.10.0
ClusterResolverData is a map of key names to fields, which gets marshaled from the raw JSON bytes stored in the ClusterResolver
type ClusterResolverInfo ¶ added in v0.10.0
type ClusterResolverInfo struct { // Docs is a link to documentation that helps resolve this manually Docs string `json:"docs"` // a comma-separated list of required fields to send in an action request Fields string `json:"fields"` }
ClusterResolverInfo contains the information for actions to be performed in order to initialize a cluster
type ClusterResolverName ¶ added in v0.10.0
type ClusterResolverName string
ClusterResolverName is the name for a cluster resolve
const ( ClusterCAData ClusterResolverName = "upload-cluster-ca-data" ClusterLocalhost ClusterResolverName = "rewrite-cluster-localhost" ClientCertData ClusterResolverName = "upload-client-cert-data" ClientKeyData ClusterResolverName = "upload-client-key-data" OIDCIssuerData ClusterResolverName = "upload-oidc-idp-issuer-ca-data" TokenData ClusterResolverName = "upload-token-data" GCPKeyData ClusterResolverName = "upload-gcp-key-data" AWSData ClusterResolverName = "upload-aws-data" )
Options for the cluster resolver names
type ClusterService ¶ added in v0.10.0
type ClusterService string
const ( EKS ClusterService = "eks" DOKS ClusterService = "doks" GKE ClusterService = "gke" Kube ClusterService = "kube" )
type Collaborator ¶ added in v0.10.0
type ConfigMapInput ¶ added in v0.10.0
type CreateAWSRequest ¶ added in v0.10.0
type CreateAWSResponse ¶ added in v0.10.0
type CreateAWSResponse struct {
*AWSIntegration
}
type CreateAddonRequest ¶ added in v0.10.0
type CreateAddonRequest struct {
*CreateReleaseBaseRequest
}
type CreateBasicRequest ¶ added in v0.10.0
type CreateBasicResponse ¶ added in v0.10.0
type CreateBasicResponse struct {
*BasicIntegration
}
type CreateClusterCandidateRequest ¶ added in v0.10.0
type CreateClusterCandidateRequest struct { ProjectID uint `json:"project_id"` Kubeconfig string `json:"kubeconfig"` // Represents whether the auth mechanism should be designated as // "local": if so, the auth mechanism uses local plugins/mechanisms purely from the // kubeconfig. IsLocal bool `json:"is_local"` }
type CreateClusterCandidateResponse ¶ added in v0.10.0
type CreateClusterCandidateResponse []*ClusterCandidate
type CreateClusterManualRequest ¶ added in v0.10.0
type CreateClusterManualRequest struct { Name string `json:"name" form:"required"` ProjectID uint `json:"project_id" form:"required"` Server string `json:"server" form:"required"` GCPIntegrationID uint `json:"gcp_integration_id"` AWSIntegrationID uint `json:"aws_integration_id"` CertificateAuthorityData string `json:"certificate_authority_data,omitempty"` }
type CreateConfigMapRequest ¶ added in v0.10.0
type CreateConfigMapResponse ¶ added in v0.10.0
type CreateDOCRInfraRequest ¶ added in v0.10.0
type CreateDOKSInfraRequest ¶ added in v0.10.0
type CreateECRInfraRequest ¶ added in v0.10.0
type CreateEKSInfraRequest ¶ added in v0.10.0
type CreateGCPRequest ¶ added in v0.10.0
type CreateGCPResponse ¶ added in v0.10.0
type CreateGCPResponse struct {
*GCPIntegration
}
type CreateGCRInfraRequest ¶ added in v0.10.0
type CreateGKEInfraRequest ¶ added in v0.10.0
type CreateGitActionConfigRequest ¶ added in v0.10.0
type CreateGitActionConfigRequest struct { GitRepo string `json:"git_repo" form:"required"` GitBranch string `json:"git_branch"` ImageRepoURI string `json:"image_repo_uri" form:"required"` DockerfilePath string `json:"dockerfile_path"` FolderPath string `json:"folder_path"` GitRepoID uint `json:"git_repo_id" form:"required"` RegistryID uint `json:"registry_id"` ShouldCreateWorkflow bool `json:"should_create_workflow"` }
type CreateInviteRequest ¶ added in v0.10.0
type CreateInviteResponse ¶ added in v0.10.0
type CreateInviteResponse struct {
*Invite
}
type CreateNamespaceRequest ¶ added in v0.10.0
type CreateNamespaceRequest struct {
Name string `json:"name" form:"required"`
}
type CreateNamespaceResponse ¶ added in v0.10.0
type CreateProjectRequest ¶ added in v0.10.0
type CreateProjectRequest struct {
Name string `json:"name" form:"required"`
}
type CreateProjectResponse ¶ added in v0.10.0
type CreateProjectResponse Project
type CreateProjectRoleRequest ¶ added in v0.10.0
type CreateRegistryRepositoryRequest ¶ added in v0.10.0
type CreateRegistryRepositoryRequest struct {
ImageRepoURI string `json:"image_repo_uri" form:"required"`
}
type CreateRegistryRequest ¶ added in v0.10.0
type CreateRegistryRequest struct { URL string `json:"url"` Name string `json:"name" form:"required"` GCPIntegrationID uint `json:"gcp_integration_id"` AWSIntegrationID uint `json:"aws_integration_id"` DOIntegrationID uint `json:"do_integration_id"` BasicIntegrationID uint `json:"basic_integration_id"` }
type CreateReleaseBaseRequest ¶ added in v0.10.0
type CreateReleaseRequest ¶ added in v0.10.0
type CreateReleaseRequest struct { *CreateReleaseBaseRequest ImageURL string `json:"image_url" form:"required"` GithubActionConfig *CreateGitActionConfigRequest `json:"github_action_config,omitempty"` }
type CreateUserRequest ¶ added in v0.10.0
type CreateUserResponse ¶ added in v0.10.0
type CreateUserResponse User
type DeleteConfigMapRequest ¶ added in v0.10.0
type DeleteConfigMapRequest struct {
Name string `schema:"name,required"`
}
type DeleteInfraRequest ¶ added in v0.10.0
type DeleteInfraRequest struct {
Name string `json:"name" form:"required"`
}
type DeleteNamespaceRequest ¶ added in v0.10.0
type DeleteNamespaceRequest struct {
Name string `json:"name" form:"required"`
}
type DeleteProjectRequest ¶ added in v0.10.0
type DeleteProjectRequest struct {
Name string `json:"name" form:"required"`
}
type DeleteProjectResponse ¶ added in v0.10.0
type DeleteProjectResponse Project
type DeleteRoleRequest ¶ added in v0.10.0
type DeleteRoleRequest struct {
UserID uint `schema:"user_id,required"`
}
type DeleteRoleResponse ¶ added in v0.10.0
type DeleteRoleResponse struct {
*Role
}
type EventStatus ¶ added in v0.10.0
type EventStatus int64
type ExternalError ¶ added in v0.10.0
type ExternalError struct {
Error string `json:"error"`
}
type FinalizeResetUserPasswordRequest ¶ added in v0.10.0
type FinalizeResetUserPasswordRequest struct { VerifyResetUserPasswordRequest NewPassword string `json:"new_password" form:"required,max=255"` }
type FormContent ¶ added in v0.10.0
type FormContent struct { Context *FormContext `yaml:"context" json:"context"` Type string `yaml:"type" json:"type"` Label string `yaml:"label" json:"label"` Required bool `json:"required"` Name string `yaml:"name,omitempty" json:"name,omitempty"` Variable string `yaml:"variable,omitempty" json:"variable,omitempty"` Placeholder string `yaml:"placeholder,omitempty" json:"placeholder,omitempty"` Value interface{} `yaml:"value,omitempty" json:"value,omitempty"` Settings struct { Docs string `yaml:"docs,omitempty" json:"docs,omitempty"` Default interface{} `yaml:"default,omitempty" json:"default,omitempty"` Unit interface{} `yaml:"unit,omitempty" json:"unit,omitempty"` OmitUnitFromValue bool `yaml:"omitUnitFromValue,omitempty" json:"omitUnitFromValue,omitempty"` DisableAfterLaunch bool `yaml:"disableAfterLaunch,omitempty" json:"disableAfterLaunch,omitempty"` Options interface{} `yaml:"options,omitempty" json:"options,omitempty"` Placeholder string `yaml:"placeholder,omitempty" json:"placeholder,omitempty"` } `yaml:"settings,omitempty" json:"settings,omitempty"` }
FormContent is a form's atomic unit
type FormContext ¶ added in v0.10.0
type FormContext struct { Type string `yaml:"type" json:"type"` Config map[string]string `yaml:"config" json:"config"` }
FormContext is the target context
type FormSection ¶ added in v0.10.0
type FormSection struct { Context *FormContext `yaml:"context" json:"context"` Name string `yaml:"name" json:"name"` ShowIf interface{} `yaml:"show_if" json:"show_if"` Contents []*FormContent `yaml:"contents" json:"contents,omitempty"` }
FormSection is a section of a form
type FormTab ¶ added in v0.10.0
type FormTab struct { Context *FormContext `yaml:"context" json:"context"` Name string `yaml:"name" json:"name"` Label string `yaml:"label" json:"label"` Sections []*FormSection `yaml:"sections" json:"sections,omitempty"` Settings struct { OmitFromLaunch bool `yaml:"omitFromLaunch,omitempty" json:"omitFromLaunch,omitempty"` } `yaml:"settings,omitempty" json:"settings,omitempty"` }
FormTab is a tab rendered in a form
type FormYAML ¶ added in v0.10.0
type FormYAML struct { Name string `yaml:"name" json:"name"` Icon string `yaml:"icon" json:"icon"` HasSource string `yaml:"hasSource" json:"hasSource"` IncludeHiddenFields string `yaml:"includeHiddenFields,omitempty" json:"includeHiddenFields,omitempty"` Description string `yaml:"description" json:"description"` Tags []string `yaml:"tags" json:"tags"` Tabs []*FormTab `yaml:"tabs" json:"tabs,omitempty"` }
FormYAML represents a chart's values.yaml form abstraction
type GCPIntegration ¶ added in v0.10.0
type GCPIntegration struct { ID uint `json:"id"` // The id of the user that linked this auth mechanism UserID uint `json:"user_id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` // The GCP project id where the service account for this auth mechanism persists GCPProjectID string `json:"gcp-project-id"` // The GCP user email that linked this service account GCPUserEmail string `json:"gcp-user-email"` }
type GetAuthenticatedUserResponse ¶ added in v0.10.0
type GetAuthenticatedUserResponse User
type GetBuildpackRequest ¶ added in v0.10.0
type GetBuildpackRequest struct {
GithubDirectoryRequest
}
type GetBuildpackResponse ¶ added in v0.10.0
type GetConfigMapRequest ¶ added in v0.10.0
type GetConfigMapRequest struct {
Name string `schema:"name,required"`
}
type GetConfigMapResponse ¶ added in v0.10.0
type GetContentsRequest ¶ added in v0.10.0
type GetContentsRequest struct {
GithubDirectoryRequest
}
type GetContentsResponse ¶ added in v0.10.0
type GetContentsResponse []GithubDirectoryItem
type GetGHATemplateRequest ¶ added in v0.10.0
type GetGHATemplateRequest struct { ReleaseName string `json:"release_name"` GithubActionConfig *CreateGitActionConfigRequest `json:"github_action_config" form:"required"` }
type GetGHATemplateResponse ¶ added in v0.10.0
type GetGHATemplateResponse string
type GetGitInstallationResponse ¶ added in v0.10.0
type GetGitInstallationResponse GitInstallation
type GetGithubAppAccountsResponse ¶ added in v0.10.0
type GetHelmRepoResponse ¶ added in v0.10.0
type GetHelmRepoResponse HelmRepo
type GetInviteResponse ¶ added in v0.10.0
type GetInviteResponse Invite
type GetJobsResponse ¶ added in v0.10.1
type GetJobsStatusResponse ¶ added in v0.10.0
type GetNotificationConfigResponse ¶ added in v0.10.0
type GetNotificationConfigResponse struct {
*NotificationConfig
}
type GetPodMetricsRequest ¶ added in v0.10.0
type GetPodMetricsRequest struct {
prometheus.QueryOpts
}
type GetPodMetricsResponse ¶ added in v0.10.0
type GetPodMetricsResponse *string
type GetPodsRequest ¶ added in v0.10.0
type GetProcfileRequest ¶ added in v0.10.0
type GetProcfileRequest struct {
Path string `schema:"path" form:"required"`
}
type GetProcfileResponse ¶ added in v0.10.0
type GetProjectPolicyResponse ¶ added in v0.10.0
type GetProjectPolicyResponse []*PolicyDocument
type GetRegistryDOCRTokenRequest ¶ added in v0.10.0
type GetRegistryDOCRTokenRequest struct {
ServerURL string `schema:"server_url"`
}
type GetRegistryECRTokenRequest ¶ added in v0.10.0
type GetRegistryECRTokenRequest struct {
Region string `schema:"region"`
}
type GetRegistryGCRTokenRequest ¶ added in v0.10.0
type GetRegistryGCRTokenRequest struct {
ServerURL string `schema:"server_url"`
}
type GetRegistryTokenResponse ¶ added in v0.10.0
type GetReleaseAllPodsResponse ¶ added in v0.10.0
type GetReleaseResponse ¶ added in v0.10.0
type GetReleaseResponse Release
type GetReleaseStepsResponse ¶ added in v0.10.0
type GetReleaseStepsResponse []SubEvent
type GetTarballURLResponse ¶ added in v0.10.0
type GetTemplateRequest ¶ added in v0.10.0
type GetTemplateRequest struct {
TemplateGetBaseRequest
}
type GetTemplateResponse ¶ added in v0.10.0
type GetTemplateResponse struct { Markdown string `json:"markdown"` Metadata *chart.Metadata `json:"metadata"` Values map[string]interface{} `json:"values"` Form *FormYAML `json:"form"` }
GetTemplateResponse is a chart with detailed information and a form for reading
type GetTemplateUpgradeNotesRequest ¶ added in v0.10.0
type GetTemplateUpgradeNotesRequest struct { TemplateGetBaseRequest PrevVersion string `schema:"prev_version"` }
type GetTemplateUpgradeNotesResponse ¶ added in v0.10.0
type GetTemplateUpgradeNotesResponse upgrade.UpgradeFile
type GetTemporaryKubeconfigResponse ¶ added in v0.10.0
type GetTemporaryKubeconfigResponse struct {
Kubeconfig []byte `json:"kubeconfig"`
}
type GitActionConfig ¶ added in v0.10.0
type GitActionConfig struct { // The git repo in ${owner}/${repo} form GitRepo string `json:"git_repo"` // The git branch to use GitBranch string `json:"git_branch"` // The complete image repository uri to pull from ImageRepoURI string `json:"image_repo_uri"` // The git integration id GitRepoID uint `json:"git_repo_id"` // The path to the dockerfile in the git repo DockerfilePath string `json:"dockerfile_path"` // The build context FolderPath string `json:"folder_path"` }
GitActionConfig
type GitInstallation ¶ added in v0.10.0
type GithubDirectoryItem ¶ added in v0.10.0
type GithubDirectoryRequest ¶ added in v0.10.0
type GithubDirectoryRequest struct {
Dir string `schema:"dir" form:"required"`
}
type Image ¶ added in v0.10.0
type Image struct { // The sha256 digest of the image manifest. Digest string `json:"digest"` // The tag used for the image. Tag string `json:"tag"` // The image manifest associated with the image. Manifest string `json:"manifest"` // The name of the repository associated with the image. RepositoryName string `json:"repository_name"` // When the image was pushed PushedAt *time.Time `json:"pushed_at"` }
Image is a Docker image type
type Infra ¶ added in v0.10.0
type Infra struct { ID uint `json:"id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` // The type of infra that was provisioned Kind InfraKind `json:"kind"` // Status is the status of the infra Status InfraStatus `json:"status"` }
type InfraStatus ¶ added in v0.10.0
type InfraStatus string
InfraStatus is the status that an infrastructure can take
const ( StatusCreating InfraStatus = "creating" StatusCreated InfraStatus = "created" StatusError InfraStatus = "error" StatusDestroying InfraStatus = "destroying" StatusDestroyed InfraStatus = "destroyed" )
The allowed statuses
type InitiateResetUserPasswordRequest ¶ added in v0.10.0
type InitiateResetUserPasswordRequest struct {
Email string `json:"email" form:"required"`
}
type ListClusterCandidateResponse ¶ added in v0.10.0
type ListClusterCandidateResponse []*ClusterCandidate
type ListClusterResponse ¶ added in v0.10.0
type ListClusterResponse []*Cluster
type ListCollaboratorsResponse ¶ added in v0.10.0
type ListCollaboratorsResponse []*Collaborator
type ListConfigMapsResponse ¶ added in v0.10.0
type ListConfigMapsResponse struct {
*v1.ConfigMapList
}
type ListGitInstallationIDsResponse ¶ added in v0.10.0
type ListGitInstallationIDsResponse []int64
type ListImageResponse ¶ added in v0.10.0
type ListImageResponse []*Image
type ListInvitesResponse ¶ added in v0.10.0
type ListInvitesResponse []*Invite
type ListNGINXIngressesResponse ¶ added in v0.10.0
type ListNGINXIngressesResponse []prometheus.SimpleIngress
type ListNamespacesResponse ¶ added in v0.10.0
type ListNamespacesResponse struct {
*v1.NamespaceList
}
type ListOAuthResponse ¶ added in v0.10.0
type ListOAuthResponse []*OAuthIntegration
type ListProjectInfraResponse ¶ added in v0.10.0
type ListProjectInfraResponse []*Infra
type ListProjectRolesResponse ¶ added in v0.10.0
type ListProjectRolesResponse []RoleKind
type ListProjectsRequest ¶ added in v0.10.0
type ListProjectsRequest struct{}
type ListProjectsResponse ¶ added in v0.10.0
type ListProjectsResponse []Project
type ListRegistryRepositoryResponse ¶ added in v0.10.0
type ListRegistryRepositoryResponse []*RegistryRepository
type ListReleasesRequest ¶ added in v0.10.0
type ListReleasesRequest struct {
*ReleaseListFilter
}
type ListReleasesResponse ¶ added in v0.10.0
type ListRepoBranchesResponse ¶ added in v0.10.0
type ListRepoBranchesResponse []string
type ListReposResponse ¶ added in v0.10.0
type ListReposResponse []Repo
type ListSlackIntegrationsResponse ¶ added in v0.10.0
type ListSlackIntegrationsResponse []*SlackIntegration
type ListTemplatesRequest ¶ added in v0.10.0
type ListTemplatesRequest struct {
TemplateGetBaseRequest
}
type ListTemplatesResponse ¶ added in v0.10.0
type ListTemplatesResponse []PorterTemplateSimple
ListTemplatesResponse is how a chart gets displayed when listed
type ListUserProjectsResponse ¶ added in v0.10.0
type ListUserProjectsResponse []*Project
type LoginUserRequest ¶ added in v0.10.0
type LoginUserResponse ¶ added in v0.10.0
type LoginUserResponse User
type NameOrUInt ¶
type NotificationConfig ¶ added in v0.10.0
type OAuthIntegration ¶ added in v0.10.0
type OAuthIntegration struct { ID uint `json:"id"` // The name of the auth mechanism Client OAuthIntegrationClient `json:"client"` // The id of the user that linked this auth mechanism UserID uint `json:"user_id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` }
OAuthIntegration is an OAuthIntegration to be shared over REST
type OAuthIntegrationClient ¶ added in v0.10.0
type OAuthIntegrationClient string
OAuthIntegrationClient is the name of an OAuth mechanism client
const ( OAuthGithub OAuthIntegrationClient = "github" OAuthDigitalOcean OAuthIntegrationClient = "do" OAuthGoogle OAuthIntegrationClient = "google" )
The supported oauth mechanism clients
type OverwriteAWSRequest ¶ added in v0.10.0
type OverwriteAWSResponse ¶ added in v0.10.0
type OverwriteAWSResponse struct {
*AWSIntegration
}
type PermissionScope ¶
type PermissionScope string
const ( UserScope PermissionScope = "user" ProjectScope PermissionScope = "project" ClusterScope PermissionScope = "cluster" RegistryScope PermissionScope = "registry" InviteScope PermissionScope = "invite" HelmRepoScope PermissionScope = "helm_repo" InfraScope PermissionScope = "infra" GitInstallationScope PermissionScope = "git_installation" NamespaceScope PermissionScope = "namespace" SettingsScope PermissionScope = "settings" ReleaseScope PermissionScope = "release" )
type Policy ¶
type Policy []*PolicyDocument
type PolicyDocument ¶
type PolicyDocument struct { Scope PermissionScope `json:"scope"` Resources []NameOrUInt `json:"resources"` Verbs []APIVerb `json:"verbs"` Children map[PermissionScope]*PolicyDocument `json:"children"` }
type PorterIntegration ¶ added in v0.10.0
type PorterIntegration struct { AuthMechanism string `json:"auth_mechanism"` Category string `json:"category"` Service string `json:"service"` }
PorterIntegration is a supported integration service, specifying an auth mechanism and the category of integration. A single service can have multiple auth mechanisms. For example, a GKE integration can have both an "oauth" mechanism and a "gcp" mechanism:
PorterIntegration{ AuthMechanism: "oauth", Category: "cluster", Service: GKE, }
PorterIntegration{ AuthMechanism: "gcp", Category: "cluster", Service: GKE, }
type PorterRelease ¶ added in v0.10.0
type PorterRelease struct { ID uint `json:"id"` WebhookToken string `json:"webhook_token"` GitActionConfig *GitActionConfig `json:"git_action_config,omitempty"` ImageRepoURI string `json:"image_repo_uri"` }
type PorterTemplateSimple ¶ added in v0.10.0
type ReadProjectResponse ¶ added in v0.10.0
type ReadProjectResponse Project
type Registry ¶ added in v0.10.0
type Registry struct { ID uint `json:"id"` // The project that this integration belongs to ProjectID uint `json:"project_id"` // Name of the registry Name string `json:"name"` // URL of the registry URL string `json:"url"` // The integration service for this registry Service RegistryService `json:"service"` // The infra id, if registry was provisioned with Porter InfraID uint `json:"infra_id"` }
type RegistryListResponse ¶ added in v0.10.0
type RegistryListResponse []Registry
type RegistryRepository ¶ added in v0.10.0
type RegistryRepository struct { // Name of the repository Name string `json:"name"` // When the repository was created CreatedAt time.Time `json:"created_at,omitempty"` // The URI of the repository URI string `json:"uri"` }
Repository is a collection of images
type RegistryService ¶ added in v0.10.0
type RegistryService string
const ( GCR RegistryService = "gcr" ECR RegistryService = "ecr" DOCR RegistryService = "docr" DockerHub RegistryService = "dockerhub" )
type Release ¶ added in v0.10.0
type Release struct { *release.Release *PorterRelease Form *FormYAML `json:"form,omitempty"` }
Release is a helm release with a form attached
type ReleaseListFilter ¶ added in v0.10.0
type ReleaseListFilter struct { Namespace string `json:"namespace"` Limit int `json:"limit"` Skip int `json:"skip"` ByDate bool `json:"byDate"` StatusFilter []string `json:"statusFilter"` }
ReleaseListFilter is a struct that represents the various filter options used for retrieving the releases
func (*ReleaseListFilter) Apply ¶ added in v0.10.0
func (h *ReleaseListFilter) Apply(list *action.List)
Apply sets the ReleaseListFilter options for an action.List
type RenameConfigMapRequest ¶ added in v0.10.0
type RenameConfigMapResponse ¶ added in v0.10.0
type RequestAction ¶ added in v0.10.0
type RequestAction struct { Verb APIVerb Resource NameOrUInt }
type RollbackReleaseRequest ¶ added in v0.10.0
type RollbackReleaseRequest struct {
Revision int `json:"revision" form:"required"`
}
type ScopeTree ¶
type ScopeTree map[PermissionScope]ScopeTree
type SlackIntegration ¶ added in v0.10.0
type SlackIntegration struct { ID uint `json:"id"` ProjectID uint `json:"project_id"` // The ID for the Slack team TeamID string `json:"team_id"` // The name of the Slack team TeamName string `json:"team_name"` // The icon url for the Slack team TeamIconURL string `json:"team_icon_url"` // The channel name that the Slack app is installed in Channel string `json:"channel"` // The URL for configuring the workspace app instance ConfigurationURL string `json:"configuration_url"` }
type StreamHelmReleaseRequest ¶ added in v0.10.0
type StreamStatusRequest ¶ added in v0.10.0
type StreamStatusRequest struct {
Selectors string `schema:"selectors"`
}
type TemplateGetBaseRequest ¶ added in v0.10.0
type TemplateGetBaseRequest struct {
RepoURL string `schema:"repo_url"`
}
type URLParam ¶ added in v0.10.0
type URLParam string
const ( URLParamProjectID URLParam = "project_id" URLParamClusterID URLParam = "cluster_id" URLParamRegistryID URLParam = "registry_id" URLParamHelmRepoID URLParam = "helm_repo_id" URLParamGitInstallationID URLParam = "git_installation_id" URLParamInfraID URLParam = "infra_id" URLParamInviteID URLParam = "invite_id" URLParamNamespace URLParam = "namespace" URLParamReleaseName URLParam = "name" URLParamReleaseVersion URLParam = "version" URLParamWildcard URLParam = "*" )
const (
URLParamJobName URLParam = "name"
)
const (
URLParamKind URLParam = "kind"
)
const (
URLParamRegion URLParam = "region"
)
const URLParamToken URLParam = "token"
type UpdateClusterRequest ¶ added in v0.10.0
type UpdateClusterRequest struct {
Name string `json:"name" form:"required"`
}
type UpdateConfigMapRequest ¶ added in v0.10.0
type UpdateConfigMapResponse ¶ added in v0.10.0
type UpdateImageBatchRequest ¶ added in v0.10.0
type UpdateInviteRoleRequest ¶ added in v0.10.0
type UpdateInviteRoleRequest struct {
Kind string `json:"kind,required"`
}
type UpdateNotificationConfigRequest ¶ added in v0.10.0
type UpdateRegistryRequest ¶ added in v0.10.0
type UpdateRegistryRequest struct {
Name string `json:"name" form:"required"`
}
UpdateRegistryRequest represents the accepted values for updating a registry (only name for now)
type UpdateReleaseStepsRequest ¶ added in v0.10.0
type UpdateReleaseStepsRequest struct {
Event SubEvent `json:"event" form:"required"`
}
type UpdateRoleRequest ¶ added in v0.10.0
type UpdateRoleResponse ¶ added in v0.10.0
type UpdateRoleResponse struct {
*Role
}
type UpgradeReleaseRequest ¶ added in v0.10.0
type VerifyEmailFinalizeRequest ¶ added in v0.10.0
type VerifyEmailFinalizeRequest struct {
VerifyTokenFinalizeRequest
}
type VerifyResetUserPasswordRequest ¶ added in v0.10.0
type VerifyResetUserPasswordRequest struct { VerifyTokenFinalizeRequest Email string `json:"email" form:"required,max=255,email"` }
type VerifyTokenFinalizeRequest ¶ added in v0.10.0
type WebhookRequest ¶ added in v0.10.0
type WebhookRequest struct {
Commit string `schema:"commit"`
}
Source Files ¶
- cluster.go
- error.go
- form.go
- git_action_config.go
- git_installation.go
- helm_release.go
- helm_repo.go
- infra.go
- integrations.go
- invite.go
- jobs.go
- namespace.go
- policy.go
- project.go
- project_integration.go
- provision.go
- registry.go
- release.go
- request.go
- role.go
- slack_integration.go
- status.go
- template.go
- user.go