Documentation
¶
Index ¶
Constants ¶
View Source
const TypstPackageEndpoint string = "https://api.github.com/repos/typst/packages/contents/packages/preview/"
Variables ¶
View Source
var ErrInvalidValidation = errors.New("invalid validation")
Functions ¶
func GetLatestVersion ¶
func GetLatestVersion(versions []*ResponseModel) (string, error)
func ValidateVersion ¶
func ValidateVersion(resp ResponseModel) (bool, error)
Validate that a given response from the github api of the typst package repository only contains valid semver strings.
Types ¶
type ResponseModel ¶
type ResponseModel struct {
Name string `json:"name" validate:"semver"`
}
func FetchDataFromGitHub ¶
func FetchDataFromGitHub(url string, ctx context.Context) ([]*ResponseModel, error)
Click to show internal directories.
Click to hide internal directories.