container

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDifferentVersion = errors.New("it's in different version")
View Source
var ErrInvalid = errors.New("it's not in container form (invalid)")
View Source
var ErrParse = errors.New("couldn't parse")
View Source
var ErrUnknownVersion = errors.New("Unknown version")

Functions

This section is empty.

Types

type Asis

type Asis struct {
	Content string
}

func ParseAsis

func ParseAsis(str string) (*Asis, error)

func (*Asis) String

func (container *Asis) String() string

func (*Asis) Version

func (container *Asis) Version() string

type Basic

type Basic struct {
	Version string
	Content string `json:"-"`
}

func ParseBasic

func ParseBasic(str string) (*Basic, error)

func (*Basic) String

func (container *Basic) String() string

type Container

type Container interface {
	Version() string
	String() string
}

func Parse

func Parse(str string) (Container, error)

type Plain1

type Plain1 struct {
	KeyName string
	Content string `json:"-"`
}

func ParsePlain1

func ParsePlain1(str string) (*Plain1, error)

func (*Plain1) String

func (container *Plain1) String() string

func (*Plain1) Version

func (container *Plain1) Version() string

type V1

type V1 struct {
	KeyName    string
	ContentKey []byte `json:"-"`
	Content    []byte `json:"-"`
}

func ParseV1

func ParseV1(str string) (*V1, error)

func (*V1) String

func (container *V1) String() string

func (*V1) Version

func (container *V1) Version() string

Jump to

Keyboard shortcuts

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