format

package
v0.0.0-...-c58f16e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputFormatText  = OutputFormat("text")
	OutputFormatTable = OutputFormat("table")
	OutputFormatJSON  = OutputFormat("json")
	OutputFormatYAML  = OutputFormat("yaml")
)

Variables

This section is empty.

Functions

func Format

func Format(data interface{}, opts *Options) (io.Reader, error)

Types

type AccountList

type AccountList dnsimple.AccountsResponse

func (AccountList) FormatJSON

func (a AccountList) FormatJSON(opts *Options) (io.Reader, error)

func (AccountList) FormatTable

func (a AccountList) FormatTable(_ *Options) (io.Reader, error)

func (AccountList) FormatYAML

func (a AccountList) FormatYAML(opts *Options) (io.Reader, error)

type CollaboratorList

type CollaboratorList dnsimple.CollaboratorsResponse

func (CollaboratorList) FormatJSON

func (a CollaboratorList) FormatJSON(opts *Options) (io.Reader, error)

func (CollaboratorList) FormatTable

func (a CollaboratorList) FormatTable(_ *Options) (io.Reader, error)

func (CollaboratorList) FormatYAML

func (a CollaboratorList) FormatYAML(opts *Options) (io.Reader, error)

type DSRItem

func (DSRItem) FormatJSON

func (d DSRItem) FormatJSON(opts *Options) (io.Reader, error)

func (DSRItem) FormatText

func (d DSRItem) FormatText(opts *Options) (io.Reader, error)

func (DSRItem) FormatYAML

func (d DSRItem) FormatYAML(opts *Options) (io.Reader, error)

type DSRList

func (DSRList) FormatJSON

func (a DSRList) FormatJSON(opts *Options) (io.Reader, error)

func (DSRList) FormatTable

func (a DSRList) FormatTable(_ *Options) (io.Reader, error)

func (DSRList) FormatYAML

func (a DSRList) FormatYAML(opts *Options) (io.Reader, error)

type DomainItem

type DomainItem dnsimple.DomainResponse

func (DomainItem) FormatJSON

func (d DomainItem) FormatJSON(opts *Options) (io.Reader, error)

func (DomainItem) FormatText

func (d DomainItem) FormatText(opts *Options) (io.Reader, error)

func (DomainItem) FormatYAML

func (d DomainItem) FormatYAML(opts *Options) (io.Reader, error)

type DomainList

type DomainList dnsimple.DomainsResponse

func (DomainList) FormatJSON

func (a DomainList) FormatJSON(opts *Options) (io.Reader, error)

func (DomainList) FormatTable

func (a DomainList) FormatTable(_ *Options) (io.Reader, error)

func (DomainList) FormatYAML

func (a DomainList) FormatYAML(opts *Options) (io.Reader, error)

type Filter

type Filter struct {
	Fields []string
}

type JSON

type JSON interface {
	FormatJSON(opts *Options) (io.Reader, error)
}

type Options

type Options struct {
	Format OutputFormat
	Query  string
}

type OutputFormat

type OutputFormat string

type Table

type Table interface {
	FormatTable(opts *Options) (io.Reader, error)
}

type Text

type Text interface {
	FormatText(opts *Options) (io.Reader, error)
}

type Whoami

type Whoami dnsimple.WhoamiResponse

func (Whoami) FormatJSON

func (w Whoami) FormatJSON(opts *Options) (io.Reader, error)

func (Whoami) FormatText

func (w Whoami) FormatText(opts *Options) (io.Reader, error)

func (Whoami) FormatYAML

func (w Whoami) FormatYAML(opts *Options) (io.Reader, error)

type YAML

type YAML interface {
	FormatYAML(opts *Options) (io.Reader, error)
}

Jump to

Keyboard shortcuts

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