Documentation ¶
Index ¶
Constants ¶
View Source
const ( RepoRootUrl = "https://raw.githubusercontent.com/TykTechnologies/tyk-examples/main" RepoGitUrl = "https://github.com/TykTechnologies/tyk-examples.git" RepoIndexFile = "repository.json" )
Variables ¶
This section is empty.
Functions ¶
func ExamplesAsLocationIndexedMap ¶
func ExamplesAsLocationIndexedMap(index *RepositoryIndex) map[string]ExampleMetadata
func IndexHasExamples ¶
func IndexHasExamples(index *RepositoryIndex) bool
Types ¶
type ExampleMetadata ¶
type ExampleMetadata struct { Location string `json:"location"` Name string `json:"name"` Description string `json:"description"` Features []string `json:"features"` MinTykVersion string `json:"minTykVersion"` }
func MergeExamples ¶
func MergeExamples(index *RepositoryIndex) []ExampleMetadata
type ExamplesCategories ¶
type ExamplesCategories map[string][]ExampleMetadata
type ExamplesClient ¶
func NewExamplesClient ¶
func NewExamplesClient(repoRootUrl string) (*ExamplesClient, error)
func (*ExamplesClient) GetAllExamples ¶
func (e *ExamplesClient) GetAllExamples() ([]ExampleMetadata, error)
func (*ExamplesClient) GetAllExamplesAsLocationIndexedMap ¶
func (e *ExamplesClient) GetAllExamplesAsLocationIndexedMap() (map[string]ExampleMetadata, error)
func (*ExamplesClient) GetRepositoryIndex ¶
func (e *ExamplesClient) GetRepositoryIndex() (*RepositoryIndex, error)
type RepositoryIndex ¶
type RepositoryIndex struct {
Examples ExamplesCategories `json:"examples"`
}
Click to show internal directories.
Click to hide internal directories.