Documentation
¶
Index ¶
- func CheckGithubFileExists(rawURL string) error
- func FetchFileContentFromGithub(rawURL string) (string, error)
- func GenerateClientID(organization string) (string, error)
- func GenerateSlug(input string) (string, error)
- func IncrementSemVer(bump_type string, semVer string) (string, error)
- func IsValidOrigin(urlStr string) bool
- func ParseDateTime(dateString string) (time.Time, error)
- func ValidateGithubFileURL(rawURL string, fileType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGithubFileExists ¶
CheckGithubFileExists checks if a file exists on GitHub without downloading the content
func FetchFileContentFromGithub ¶
FetchFileContentFromGithub fetches content from GitHub URL specified in the signal type schema field
func GenerateClientID ¶
func GenerateSlug ¶
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 ¶
expects a semver in the form "major.minor.patch" and increments major/minor/patch according to supplied bump_type
func IsValidOrigin ¶
check for valid origins, e.g http://localhost:8080 , https://example.com etc
func ParseDateTime ¶
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 ¶
ValidateGithubFileURL validates the GitHub URL structure for schema and readme files submitted as part of the signal type definition
Types ¶
This section is empty.