nip45

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: CC0-1.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const COUNT = "COUNT"
View Source
const LCount nip1.Label = 9

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count struct {
	Count       int64 `json:"count"`
	Approximate bool  `json:"approximate,omitempty"`
}

type CountRequestEnvelope

type CountRequestEnvelope struct {
	SubscriptionID nip1.SubscriptionID
	nip1.Filters
}

func (*CountRequestEnvelope) Bytes

func (C *CountRequestEnvelope) Bytes() (s []byte)

func (*CountRequestEnvelope) Label

func (C *CountRequestEnvelope) Label() nip1.Label

func (*CountRequestEnvelope) MarshalJSON

func (C *CountRequestEnvelope) MarshalJSON() (bytes []byte, e error)

MarshalJSON returns the JSON encoded form of the envelope.

func (*CountRequestEnvelope) String

func (C *CountRequestEnvelope) String() (s string)

func (*CountRequestEnvelope) ToArray

func (C *CountRequestEnvelope) ToArray() array.T

func (*CountRequestEnvelope) Unmarshal

func (C *CountRequestEnvelope) Unmarshal(buf *text.Buffer) (e error)

type CountResponseEnvelope

type CountResponseEnvelope struct {
	SubscriptionID nip1.SubscriptionID
	Count          int64
	Approximate    bool
}

func NewCountResponseEnvelope

func NewCountResponseEnvelope(sid nip1.SubscriptionID, count int64,
	approx bool) (C *CountResponseEnvelope)

func (*CountResponseEnvelope) Bytes

func (C *CountResponseEnvelope) Bytes() (s []byte)

func (*CountResponseEnvelope) Label

func (C *CountResponseEnvelope) Label() nip1.Label

func (*CountResponseEnvelope) MarshalJSON added in v1.0.7

func (C *CountResponseEnvelope) MarshalJSON() (bytes []byte, e error)

func (*CountResponseEnvelope) String

func (C *CountResponseEnvelope) String() (s string)

func (*CountResponseEnvelope) ToArray

func (C *CountResponseEnvelope) ToArray() array.T

func (*CountResponseEnvelope) Unmarshal

func (C *CountResponseEnvelope) Unmarshal(buf *text.Buffer) (e error)

Jump to

Keyboard shortcuts

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