validator

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DistinctChannelPrefix   = "!members-"
	DefaultMaxMessageLength = 20_000
)
View Source
const (
	TypeMessageRegular string = "regular"
	TypeMessageDeleted string = "deleted"
	TypeMessageSystem  string = "system"
	TypeMessageReply   string = "reply"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bits256

type Bits256 [sha512.Size256]byte

type Decoder

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

func NewDecoder

func NewDecoder(r io.ReadSeeker) *Decoder

func (*Decoder) Items

func (d *Decoder) Items(fn func(item Item) error) error

type Item

type Item interface {
	// contains filtered or unexported methods
}

type ItemError

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

func (*ItemError) Error

func (e *ItemError) Error() string

func (*ItemError) Item

func (e *ItemError) Item() rawItem

func (ItemError) MarshalJSON

func (e ItemError) MarshalJSON() ([]byte, error)

func (*ItemError) Offset

func (e *ItemError) Offset() int64

type Options added in v1.7.0

type Options func(*option)

func LighterValidationChannelID added in v1.7.0

func LighterValidationChannelID() Options

type Results

type Results struct {
	Stats  map[string]int
	Errors []error
}

func (*Results) HasErrors

func (r *Results) HasErrors() bool

type Set

type Set map[string]struct{}

func NewSet

func NewSet(ls ...string) Set

type Validator

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

func New

func New(r io.ReadSeeker, roles []*streamchat.Role, channelTypes channelTypeMap, options ...Options) *Validator

func (*Validator) Validate

func (v *Validator) Validate() *Results

type WrapError

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

func (*WrapError) Error

func (e *WrapError) Error() string

func (WrapError) MarshalJSON

func (e WrapError) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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