rw

package
v0.0.0-...-c5d708b Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2014 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RwError

func RwError(e RwBase, err string) error

Types

type AES256

type AES256 struct {
	File         string `json:"file,omitempty"`
	Base64String string `json:"base64,omitempty"`
	Name         string `json:"-"`
	// contains filtered or unexported fields
}

func (*AES256) Decode

func (c *AES256) Decode(r io.Reader, w io.Writer, d *Data) error

func (*AES256) Encode

func (c *AES256) Encode(r io.Reader, w io.Writer, d *Data) error

func (*AES256) GetName

func (c *AES256) GetName() string

func (*AES256) Init

func (c *AES256) Init() error

type Data

type Data struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewData

func NewData() *Data

func NewDataFrom

func NewDataFrom(o map[string]interface{}) *Data

func (*Data) Export

func (d *Data) Export() map[string]interface{}

func (*Data) Filter

func (d *Data) Filter() ([]byte, error)

func (*Data) Get

func (d *Data) Get(key string) (interface{}, error)

func (*Data) Set

func (d *Data) Set(key string, value interface{})

func (*Data) ToJson

func (d *Data) ToJson() ([]byte, error)

type DataMap

type DataMap map[string]interface{}

type Decoder

type Decoder interface {
	RwBase
	Decode(io.Reader, io.Writer, *Data) error
}

type DecodingPipeline

type DecodingPipeline struct {
	Decoders []Decoder
	Input    Inputer
}

type Deleter

type Deleter interface {
	RwBase
	Delete(string) error
}

type EncodeDecoder

type EncodeDecoder interface {
	RwBase
	Encode(io.Reader, io.Writer, *Data) error
	Decode(io.Reader, io.Writer, *Data) error
}

type Encoder

type Encoder interface {
	RwBase
	Encode(io.Reader, io.Writer, *Data) error
}

type EncodingPipeline

type EncodingPipeline struct {
	Encoders []Encoder
	Output   Outputer
}

type File

type File struct {
	Dir  string `json:"dir"`
	Name string `json:"name"`
}

func (*File) Delete

func (s *File) Delete(id string, d *Data) error

func (*File) GetName

func (s *File) GetName() string

func (*File) Init

func (s *File) Init() error

func (*File) NewReader

func (s *File) NewReader(id string, d *Data) (io.ReadCloser, error)

func (*File) NewWriter

func (s *File) NewWriter(id string, d *Data) (io.WriteCloser, error)

type Gzip

type Gzip struct {
	Algo string `json:"algo,omitempty"`
	Name string
}

func (*Gzip) Decode

func (c *Gzip) Decode(r io.Reader, w io.Writer, d *Data) error

func (*Gzip) Encode

func (c *Gzip) Encode(r io.Reader, w io.Writer, d *Data) error

func (*Gzip) GetName

func (c *Gzip) GetName() string

func (*Gzip) Init

func (c *Gzip) Init() error

type Inputer

type Inputer interface {
	RwBase
	NewReader(string, *Data) (io.ReadCloser, error)
}

type Outputer

type Outputer interface {
	RwBase
	NewWriter(string, *Data) (io.WriteCloser, error)
}

type Pipeline

type Pipeline struct {
	Errors []error
	// contains filtered or unexported fields
}

func NewDecoding

func NewDecoding(decoders []Decoder, r io.ReadCloser, d *Data) *Pipeline

func NewEncoding

func NewEncoding(encoders []Encoder, r io.ReadCloser, d *Data) *Pipeline

func (*Pipeline) Exec

func (p *Pipeline) Exec(w io.Writer) error

type Resize

type Resize struct {
	Height        uint   `json:"height"`
	Width         uint   `json:"width"`
	Interpolation string `json:"interpolation,omitempty"`
	Output        string `json:"output"`
	Name          string `json:"-"`
	// contains filtered or unexported fields
}

func (*Resize) Encode

func (re *Resize) Encode(r io.Reader, w io.Writer, d *Data) error

func (*Resize) GetName

func (re *Resize) GetName() string

func (*Resize) Init

func (re *Resize) Init() error

type RwBase

type RwBase interface {
	GetName() string
	Init() error
}

type S3Bucket

type S3Bucket struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Region    string `json:"region,omitempty"`
	Bucket    string `json:"bucket"`
	Name      string `json:"name"`
	// contains filtered or unexported fields
}

func (*S3Bucket) Delete

func (s *S3Bucket) Delete(id string, d *Data) error

func (*S3Bucket) GetName

func (s *S3Bucket) GetName() string

func (*S3Bucket) Init

func (s *S3Bucket) Init() error

func (*S3Bucket) NewReader

func (s *S3Bucket) NewReader(id string, d *Data) (io.ReadCloser, error)

func (*S3Bucket) NewWriter

func (s *S3Bucket) NewWriter(id string, d *Data) (io.WriteCloser, error)

type Shell

type Shell struct {
	Cmd  string `json:"cmd"`
	Name string `json:"-"`
}

func (*Shell) Encode

func (s *Shell) Encode(r io.Reader, w io.Writer, d *Data) error

func (*Shell) GetName

func (s *Shell) GetName() string

func (*Shell) Init

func (s *Shell) Init() error

Jump to

Keyboard shortcuts

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