common

package
v1.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

View Source
const (
	MultiUserMode                       string = "MULTIUSER"
	MultiUserModeSharedReadAccess       string = "MULTIUSER_SHARED_READ"
	PodNamespace                        string = "POD_NAMESPACE"
	CacheEnabled                        string = "CacheEnabled"
	DefaultPipelineRunnerServiceAccount string = "DefaultPipelineRunnerServiceAccount"
	KubeflowUserIDHeader                string = "KUBEFLOW_USERID_HEADER"
	KubeflowUserIDPrefix                string = "KUBEFLOW_USERID_PREFIX"
	UpdatePipelineVersionByDefault      string = "AUTO_UPDATE_PIPELINE_DEFAULT_VERSION"
	TokenReviewAudience                 string = "TOKEN_REVIEW_AUDIENCE"
)
View Source
const (
	RbacKubeflowGroup    = "kubeflow.org"
	RbacPipelinesGroup   = "pipelines.kubeflow.org"
	RbacPipelinesVersion = "v1beta1"

	RbacResourceTypePipelines      = "pipelines"
	RbacResourceTypeExperiments    = "experiments"
	RbacResourceTypeRuns           = "runs"
	RbacResourceTypeJobs           = "jobs"
	RbacResourceTypeViewers        = "viewers"
	RbacResourceTypeVisualizations = "visualizations"

	RbacResourceVerbArchive   = "archive"
	RbacResourceVerbUpdate    = "update"
	RbacResourceVerbCreate    = "create"
	RbacResourceVerbDelete    = "delete"
	RbacResourceVerbDisable   = "disable"
	RbacResourceVerbEnable    = "enable"
	RbacResourceVerbGet       = "get"
	RbacResourceVerbList      = "list"
	RbacResourceVerbRetry     = "retry"
	RbacResourceVerbTerminate = "terminate"
	RbacResourceVerbUnarchive = "unarchive"
)
View Source
const (
	GoogleIAPUserIdentityHeader    string = "x-goog-authenticated-user-email"
	GoogleIAPUserIdentityPrefix    string = "accounts.google.com:"
	AuthorizationBearerTokenHeader string = "Authorization"
	AuthorizationBearerTokenPrefix string = "Bearer "
)
View Source
const DefaultTokenReviewAudience string = "pipelines.kubeflow.org"

Variables

This section is empty.

Functions

func CreateArtifactPath

func CreateArtifactPath(runID string, nodeID string, artifactName string) string

CreateArtifactPath creates artifact resource path.

func GetBoolConfigWithDefault

func GetBoolConfigWithDefault(configName string, value bool) bool

func GetBoolFromStringWithDefault

func GetBoolFromStringWithDefault(value string, defaultValue bool) bool

func GetDurationConfig

func GetDurationConfig(configName string) time.Duration

func GetExperimentIDFromAPIResourceReferences

func GetExperimentIDFromAPIResourceReferences(resourceRefs []*api.ResourceReference) string

func GetFloat64ConfigWithDefault

func GetFloat64ConfigWithDefault(configName string, value float64) float64

func GetIntConfigWithDefault

func GetIntConfigWithDefault(configName string, value int) int

func GetKubeflowUserIDHeader

func GetKubeflowUserIDHeader() string

func GetKubeflowUserIDPrefix

func GetKubeflowUserIDPrefix() string

func GetMapConfig

func GetMapConfig(configName string) map[string]string

func GetNamespaceFromAPIResourceReferences

func GetNamespaceFromAPIResourceReferences(resourceRefs []*api.ResourceReference) string

func GetPodNamespace

func GetPodNamespace() string

func GetStringConfig

func GetStringConfig(configName string) string

func GetStringConfigWithDefault

func GetStringConfigWithDefault(configName, value string) string

func GetTokenReviewAudience

func GetTokenReviewAudience() string

func IsCacheEnabled

func IsCacheEnabled() string

func IsMultiUserMode

func IsMultiUserMode() bool

func IsMultiUserSharedReadMode

func IsMultiUserSharedReadMode() bool

func IsPipelineVersionUpdatedByDefault

func IsPipelineVersionUpdatedByDefault() bool

Types

type FilterContext

type FilterContext struct {
	// Filter by a specific reference key
	*ReferenceKey
}

type PaginationContext

type PaginationContext struct {
	PageSize        int
	SortByFieldName string
	KeyFieldName    string
	IsDesc          bool
	Token           *Token
}

type ReferenceKey

type ReferenceKey struct {
	Type ResourceType
	ID   string
}

type Relationship

type Relationship string
const (
	Owner   Relationship = "Owner"
	Creator Relationship = "Creator"
)

func ToModelRelationship

func ToModelRelationship(r api.Relationship) (Relationship, error)

type ResourceType

type ResourceType string
const (
	Experiment      ResourceType = "Experiment"
	Job             ResourceType = "Job"
	Run             ResourceType = "Run"
	Pipeline        ResourceType = "pipeline"
	PipelineVersion ResourceType = "PipelineVersion"
	Namespace       ResourceType = "Namespace"
)

func ToModelResourceType

func ToModelResourceType(apiType api.ResourceType) (ResourceType, error)

type Token

type Token struct {
	// The value of the sorted field of the next row to be returned.
	SortByFieldValue string
	// The value of the key field of the next row to be returned.
	KeyFieldValue string
}

A deserialized token. Assuming the list request is sorted by name, a typical token should be {SortByFieldValue:"foo", KeyFieldValue:"2"} The corresponding list query would be select * from table where (name, id) >=(foobar,2) order by name, id limit page_size

Jump to

Keyboard shortcuts

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