countenvelope

package
v1.2.18 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const L = "COUNT"

Variables

This section is empty.

Functions

func NewResponseFrom

func NewResponseFrom[V S | B](s V, cnt N, approx ...bool) (res *Response, err E)

func Parse

func Parse(b B) (t *Response, rem B, err E)

func ParseRequest

func ParseRequest(b B) (t *Request, rem B, err E)

Types

type B

type B = []byte

type Ctx

type Ctx = context.T

type E

type E = error

type N

type N = int

type Request

type Request struct {
	Subscription *subscription.Id
	Filters      *filters.T
}

func New

func New() *Request

func NewRequest

func NewRequest(id *subscription.Id, filters *filters.T) *Request

func (*Request) Label

func (en *Request) Label() string

func (*Request) MarshalJSON

func (en *Request) MarshalJSON(dst B) (b B, err error)

func (*Request) UnmarshalJSON

func (en *Request) UnmarshalJSON(b B) (r B, err error)

func (*Request) Write

func (en *Request) Write(w io.Writer) (err E)

type Response

type Response struct {
	ID          *subscription.Id
	Count       int
	Approximate bool
}

func NewResponse

func NewResponse() *Response

func (*Response) Label

func (en *Response) Label() string

func (*Response) MarshalJSON

func (en *Response) MarshalJSON(dst B) (b B, err error)

func (*Response) UnmarshalJSON

func (en *Response) UnmarshalJSON(b B) (r B, err error)

func (*Response) Write

func (en *Response) Write(w io.Writer) (err E)

type S

type S = string

Jump to

Keyboard shortcuts

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