utils

package
v0.0.0-...-54fb291 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGithubFileExists

func CheckGithubFileExists(rawURL string) error

CheckGithubFileExists checks if a file exists on GitHub without downloading the content

func FetchFileContentFromGithub

func FetchFileContentFromGithub(rawURL string) (string, error)

FetchFileContentFromGithub fetches content from GitHub URL specified in the signal type schema field

func GenerateClientID

func GenerateClientID(organization string) (string, error)

func GenerateSlug

func GenerateSlug(input string) (string, error)

GenerateSlug generates a URL-friendly slug from a given string. slugs identify a set of versioned signal_types describing the same data set. Only the owner of the inital slug can update it or add new versions. A slug can't be owned by more than one user.

func IncrementSemVer

func IncrementSemVer(bump_type string, semVer string) (string, error)

expects a semver in the form "major.minor.patch" and increments major/minor/patch according to supplied bump_type

func IsValidOrigin

func IsValidOrigin(urlStr string) bool

check for valid origins, e.g http://localhost:8080 , https://example.com etc

func ParseDateTime

func ParseDateTime(dateString string) (time.Time, error)

check that the supplied string conforms to the date formats supported by the API (ISO 8601 or YYYY-MM-DD) Assume YYYY-MM-DD is the start of day in UTC e.g 2006-01-02T00:00:00Z

func ValidateGithubFileURL

func ValidateGithubFileURL(rawURL string, fileType string) error

ValidateGithubFileURL validates the GitHub URL structure for schema and readme files submitted as part of the signal type definition

Types

This section is empty.

Jump to

Keyboard shortcuts

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