common

package
v0.0.0-...-4f670de Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MultiUserMode                       string = "MULTIUSER"
	PodNamespace                        string = "POD_NAMESPACE"
	CacheEnabled                        string = "CacheEnabled"
	DefaultPipelineRunnerServiceAccount string = "DefaultPipelineRunnerServiceAccount"
)
View Source
const (
	GoogleIAPUserIdentityHeader string = "x-goog-authenticated-user-email"
)

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 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 IsCacheEnabled

func IsCacheEnabled() string

func IsMultiUserMode

func IsMultiUserMode() 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