validator

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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) *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