link

package
v0.0.0-...-022116b Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentLink struct {
	Document struct {
		Id   string
		Type string
		Slug string
	}
	Url      string
	IsBroken bool
}

A link to a prismic document

func (*DocumentLink) Decode

func (l *DocumentLink) Decode(enc interface{}) error

func (*DocumentLink) GetText

func (l *DocumentLink) GetText() string

func (*DocumentLink) GetUrl

func (l *DocumentLink) GetUrl() string

func (*DocumentLink) Resolve

func (l *DocumentLink) Resolve(r Resolver)
type Link interface {
	Decode(interface{}) error
	GetUrl() string
	GetText() string
	Resolve(Resolver)
}

func Decode

func Decode(t string, enc interface{}) (Link, error)
type MediaLink struct {
	File struct {
		Url      string
		Kind     string
		Filename string
	}
}

A link to a file

func (*MediaLink) Decode

func (l *MediaLink) Decode(enc interface{}) error

func (*MediaLink) GetText

func (l *MediaLink) GetText() string

func (*MediaLink) GetUrl

func (l *MediaLink) GetUrl() string

func (*MediaLink) Resolve

func (l *MediaLink) Resolve(_ Resolver)

type Resolver

type Resolver func(Link) string
type WebLink struct {
	Url string
}

A link to a website

func (*WebLink) Decode

func (l *WebLink) Decode(enc interface{}) error

func (*WebLink) GetText

func (l *WebLink) GetText() string

func (*WebLink) GetUrl

func (l *WebLink) GetUrl() string

func (*WebLink) Resolve

func (l *WebLink) Resolve(_ Resolver)

Jump to

Keyboard shortcuts

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