util

package
v0.44.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViewerRole  = "viewer"
	ManagerRole = "manager"
	AdminRole   = "admin"
)

Variables

View Source
var AllowedArtifactStateEnumValues = []string{
	"ENABLED",
	"DISABLED",
	"DEPRECATED",
}
View Source
var AllowedArtifactTypeEnumValues = []string{
	"AVRO",
	"PROTOBUF",
	"JSON",
	"OPENAPI",
	"ASYNCAPI",
	"GRAPHQL",
	"KCONNECT",
	"WSDL",
	"XSD",
	"XML",
}
View Source
var AllowedRoleTypeEnumValues = []string{
	ViewerRole,
	ManagerRole,
	AdminRole,
}

Functions

func CreateFileFromStdin

func CreateFileFromStdin() (*os.File, error)

func GetAllowedArtifactStateEnumValuesAsString added in v0.29.1

func GetAllowedArtifactStateEnumValuesAsString() string

GetAllowedArtifactTypeEnumValuesAsString gets artifact types as string.

func GetAllowedArtifactTypeEnumValuesAsString

func GetAllowedArtifactTypeEnumValuesAsString() string

GetAllowedArtifactTypeEnumValuesAsString gets artifact types as string.

func GetAllowedRoleTypeEnumValuesAsString added in v0.31.0

func GetAllowedRoleTypeEnumValuesAsString() string

GetAllowedRoleTypeEnumValuesAsString gets types of roles as string.

func GetArtifactURL added in v0.36.4

func GetArtifactURL(registry *registrymgmtclient.Registry, metadata *registryinstanceclient.ArtifactMetaData) (artifactURL string, ok bool)

GetArtifactURL takes registry and artifact metadata to build URL to artifact in console

func GetContentFromFileURL added in v0.38.0

func GetContentFromFileURL(ctx context.Context, url string) (*os.File, error)

GetContentFromFileURL loads file content from the provided URL

func GetRoleEnum added in v0.38.0

func GetRoleEnum(role string) registryinstanceclient.RoleType

func GetRoleLabel added in v0.38.0

func GetRoleLabel(role registryinstanceclient.RoleType) string

func IsURL added in v0.38.0

func IsURL(s string) bool

IsURL accepts a string and determines if it is a URL

Types

This section is empty.

Jump to

Keyboard shortcuts

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