utils

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamDashboard        = "dashboard"
	ParamName             = "name"
	ParamProject          = "project"
	APIPrefix             = "/api"
	PathAuth              = "auth"
	PathAuthProviders     = "auth/providers"
	PathLogin             = "login"
	PathCallback          = "callback"
	PathLogout            = "logout"
	PathRefresh           = "refresh"
	AuthKindNative        = "native"
	AuthKindOIDC          = "oidc"
	AuthKindOAuth         = "oauth"
	APIV1Prefix           = "/api/v1"
	PathDashboard         = "dashboards"
	PathDatasource        = "datasources"
	PathFolder            = "folders"
	PathGlobalDatasource  = "globaldatasources"
	PathGlobalRole        = "globalroles"
	PathGlobalRoleBinding = "globalrolebindings"
	PathGlobalSecret      = "globalsecrets"
	PathGlobalVariable    = "globalvariables"
	PathProject           = "projects"
	PathRole              = "roles"
	PathRoleBinding       = "rolebindings"
	PathSecret            = "secrets"
	PathUnsaved           = "unsaved"
	PathUser              = "users"
	PathVariable          = "variables"
)

Variables

ProjectResourcePathList is containing the list of the resource path that is part of a project.

Functions

func AppendIfMissing added in v0.43.0

func AppendIfMissing[T comparable](slice []T, value T) ([]T, bool)

AppendIfMissing will append the value in the slice, only if not already present. Will return a boolean saying if the value has been appended or not.

func GetMetadataProject

func GetMetadataProject(metadata api.Metadata) string

GetMetadataProject Retrieve project from entity metadata

func GetNameParameter

func GetNameParameter(ctx echo.Context) string

func GetProjectParameter

func GetProjectParameter(ctx echo.Context) string

func ValidateMetadata

func ValidateMetadata(ctx echo.Context, metadata api.Metadata) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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