fragment

package
v0.0.0-...-f9ae87e Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Children

type Children = map[string]*Definition

type Collection

type Collection = []*Definition

type Definition

type Definition struct {
	Path string

	Metadata         map[string]string
	IgnoreValidation bool
	// contains filtered or unexported fields
}

func Define

func Define(path string, options ...DefinitionOption) *Definition

func (*Definition) Child

func (d *Definition) Child(name string) *Definition

func (*Definition) Children

func (d *Definition) Children() map[string]*Definition

func (*Definition) DynamicParts

func (d *Definition) DynamicParts() []string

func (*Definition) Requestable

func (d *Definition) Requestable(target *url.URL, pathParams map[string]string, query url.Values) (*Request, error)

type DefinitionOption

type DefinitionOption = func(*Definition)

func WithChild

func WithChild(name string, child *Definition) DefinitionOption

func WithChildren

func WithChildren(children Children) DefinitionOption

func WithMetadata

func WithMetadata(metadata map[string]string) DefinitionOption

func WithoutValidation

func WithoutValidation() DefinitionOption

type Request

type Request struct {
	RequestURL *url.URL
	Definition *Definition
	// contains filtered or unexported fields
}

func (*Request) Metadata

func (fr *Request) Metadata() map[string]string

func (*Request) TemplateURL

func (fr *Request) TemplateURL() string

func (*Request) URL

func (fr *Request) URL() string

Jump to

Keyboard shortcuts

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