utils

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PROVIDER_BASE_PATH = "registry://providers"

Variables

This section is empty.

Functions

func ConstructProviderVersionURI

func ConstructProviderVersionURI(providerNamespace interface{}, providerName string, providerVersion interface{}) string

func ContainsSlug

func ContainsSlug(sourceName string, slug string) (bool, error)

ContainsSlug checks if the sourceName string contains the slug string anywhere within it. It safely handles potential regex metacharacters in the slug.

func ExtractProviderNameAndVersion

func ExtractProviderNameAndVersion(uri string) (string, string, string)

func ExtractReadme

func ExtractReadme(readme string) string

func IsV2ProviderDataType

func IsV2ProviderDataType(dataType string) bool

func IsValidProviderDataType

func IsValidProviderDataType(providerDataType string) bool

func IsValidProviderVersionFormat

func IsValidProviderVersionFormat(version string) bool

IsValidProviderVersionFormat checks if the provider version format is valid.

func LogAndReturnError

func LogAndReturnError(logger *log.Logger, context string, err error) error

LogAndReturnError logs the error with context and returns a formatted error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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