transmission

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCSVIterator

func NewCSVIterator(raw string) *csvIterator

func NewNumericRangeIterator

func NewNumericRangeIterator(min, max int) *numericRangeIterator

func NewWordlistIterator

func NewWordlistIterator(content string) *wordlistIterator

Types

type Boolean

type Boolean struct {
	// contains filtered or unexported fields
}

func NewBoolean

func NewBoolean(value bool) *Boolean

func (*Boolean) Bool

func (e *Boolean) Bool() bool

func (*Boolean) MarshalJSON

func (e *Boolean) MarshalJSON() ([]byte, error)

func (*Boolean) Type

func (e *Boolean) Type() Type

func (*Boolean) UnmarshalJSON

func (e *Boolean) UnmarshalJSON(data []byte) error

type Booler

type Booler interface{ Bool() bool }

type Choice added in v0.0.2

type Choice struct {
	// contains filtered or unexported fields
}

func NewChoice added in v0.0.2

func NewChoice(key string, options map[string]string) *Choice

func (*Choice) Choice added in v0.0.2

func (t *Choice) Choice() (string, map[string]string)

func (*Choice) MarshalJSON added in v0.0.2

func (t *Choice) MarshalJSON() ([]byte, error)

func (*Choice) Type added in v0.0.2

func (t *Choice) Type() Type

func (*Choice) UnmarshalJSON added in v0.0.2

func (t *Choice) UnmarshalJSON(data []byte) error

type Chooser added in v0.0.2

type Chooser interface {
	Choice() (string, map[string]string)
}

type Int

type Int int

func NewInt

func NewInt(i int) *Int

func (*Int) Int

func (i *Int) Int() int

func (*Int) MarshalJSON

func (i *Int) MarshalJSON() ([]byte, error)

func (*Int) Type

func (i *Int) Type() Type

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

type Inter

type Inter interface{ Int() int }

type InternalType

type InternalType uint32
const (
	InternalTypeNone InternalType = iota
	InternalTypeUnknown
	InternalTypeNumericRangeList
	InternalTypeWordlist
	InternalTypeCommaSeparatedList
)

type Lister

type Lister interface {
	Reset()
	Clone() Lister
	Next() (string, bool)
	Count() int
	Complete() bool
}

type Map

type Map map[string]string

func NewMap

func NewMap(data map[string]string) *Map

func (*Map) Map

func (t *Map) Map() map[string]string

func (*Map) MarshalJSON

func (t *Map) MarshalJSON() ([]byte, error)

func (*Map) Type

func (t *Map) Type() Type

func (*Map) UnmarshalJSON

func (t *Map) UnmarshalJSON(data []byte) error

type Mapper

type Mapper interface{ Map() map[string]string }

type ParentType

type ParentType uint32
const (
	// public types
	TypeUnknown ParentType = 1 << iota
	TypeString
	TypeInt
	TypeMap
	TypeList
	TypeRequest
	TypeResponse
	TypeStart
	TypeBoolean
	TypeChoice
	TypeAny = 0
)

func (ParentType) Contains

func (t ParentType) Contains(other ParentType) bool

type Request

type Request packaging.HttpRequest

func NewRequest

func NewRequest(req packaging.HttpRequest) *Request

func (*Request) MarshalJSON

func (r *Request) MarshalJSON() ([]byte, error)

func (*Request) Request

func (r *Request) Request() packaging.HttpRequest

func (*Request) Type

func (r *Request) Type() Type

func (*Request) UnmarshalJSON

func (r *Request) UnmarshalJSON(data []byte) error

type RequestResponsePair

type RequestResponsePair struct {
	// contains filtered or unexported fields
}

func (*RequestResponsePair) MarshalJSON

func (p *RequestResponsePair) MarshalJSON() ([]byte, error)

func (*RequestResponsePair) Request

func (*RequestResponsePair) Response

func (*RequestResponsePair) Type

func (p *RequestResponsePair) Type() Type

func (*RequestResponsePair) UnmarshalJSON

func (p *RequestResponsePair) UnmarshalJSON(data []byte) error

type RequestResponsePairWithMap

type RequestResponsePairWithMap struct {
	// contains filtered or unexported fields
}

func NewRequestResponsePairWithMap

func NewRequestResponsePairWithMap(req packaging.HttpRequest, resp packaging.HttpResponse, params map[string]string) *RequestResponsePairWithMap

func (*RequestResponsePairWithMap) Map

func (*RequestResponsePairWithMap) MarshalJSON

func (p *RequestResponsePairWithMap) MarshalJSON() ([]byte, error)

func (*RequestResponsePairWithMap) Request

func (*RequestResponsePairWithMap) Response

func (*RequestResponsePairWithMap) Type

func (p *RequestResponsePairWithMap) Type() Type

func (*RequestResponsePairWithMap) UnmarshalJSON

func (p *RequestResponsePairWithMap) UnmarshalJSON(data []byte) error

type Requester

type Requester interface{ Request() packaging.HttpRequest }

type Response

type Response packaging.HttpResponse

func (*Response) MarshalJSON

func (r *Response) MarshalJSON() ([]byte, error)

func (*Response) Response

func (r *Response) Response() packaging.HttpResponse

func (*Response) Type

func (r *Response) Type() Type

func (*Response) UnmarshalJSON

func (r *Response) UnmarshalJSON(data []byte) error

type Responser

type Responser interface{ Response() packaging.HttpResponse }

type Start

type Start struct {
}

func NewStart

func NewStart() *Start

func (*Start) MarshalJSON

func (e *Start) MarshalJSON() ([]byte, error)

func (*Start) Type

func (e *Start) Type() Type

func (*Start) UnmarshalJSON

func (e *Start) UnmarshalJSON([]byte) error

type String

type String string

func NewString

func NewString(s string) *String

func (*String) MarshalJSON

func (t *String) MarshalJSON() ([]byte, error)

func (*String) String

func (t *String) String() string

func (*String) Type

func (t *String) Type() Type

func (*String) UnmarshalJSON

func (t *String) UnmarshalJSON(data []byte) error

type Stringer

type Stringer interface{ String() string }

type Transmission

type Transmission interface {
	Type() Type
	MarshalJSON() ([]byte, error)
	UnmarshalJSON([]byte) error
}

func UnmarshalJSON

func UnmarshalJSON(t Type, data json.RawMessage) (Transmission, error)

type Type

type Type uint64

func NewType

func NewType(parent ParentType, internal InternalType) Type

func (Type) Internal

func (t Type) Internal() InternalType

func (Type) MarshalJSON

func (t Type) MarshalJSON() ([]byte, error)

func (Type) Parent

func (t Type) Parent() ParentType

func (*Type) UnmarshalJSON

func (t *Type) UnmarshalJSON(data []byte) error

func (Type) Validate

func (t Type) Validate(transmission Transmission) error

Jump to

Keyboard shortcuts

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