examplesrepo

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

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 struct {
	UDG []ExampleMetadata `json:"udg"`
}

type ExamplesClient

type ExamplesClient struct {
	RepositoryRootUrl *url.URL
	// contains filtered or unexported fields
}

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"`
}

Jump to

Keyboard shortcuts

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