topic

package
v0.0.0-...-a26ebea Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMustMatchPattern = validation.NewError(
	"topic_must_match_pattern",
	fmt.Sprintf("the topic value must match the following pattern: %s", pattern),
)

ErrMustMatchPattern is the validation check error returned when the topic doesn't match length or character requirements.

Functions

This section is empty.

Types

type Topic

type Topic string

Topic represents a kafka topic.

func Generate

func Generate(rand *rand.Rand) Topic

Generate a random Topic value.

func New

New creates and validates a new Topic from the given string.

func (Topic) Check

func (t Topic) Check() validation.ErrorGroup

Check runs default validation checks for the Topic.

func (Topic) Equals

func (t Topic) Equals(v any) bool

Equals compares two Topic instances for equality.

Interface: comparison.Equaler

func (Topic) Generate

func (Topic) Generate(rand *rand.Rand, size int) reflect.Value

Generate random Topic values.

Interface: quick.Generator

func (Topic) MarshalBinary

func (t Topic) MarshalBinary() (data []byte, err error)

MarshalBinary converts the Topic instance to binary form.

Interface: encoding.BinaryMarshaler

func (Topic) MarshalBinaryWriter

func (t Topic) MarshalBinaryWriter(w io.Writer) (err error)

MarshalBinaryWriter populates the io.Writer with Topic data in its binary form.

func (Topic) MarshalJSON

func (t Topic) MarshalJSON() (data []byte, err error)

MarshalJSON converts the Topic instance to JSON form.

Interface: json.Marshaler

func (Topic) String

func (t Topic) String() string

String value of the Topic.

Interface: fmt.Stringer.

func (*Topic) UnmarshalBinary

func (t *Topic) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary converts the binary form to a Topic instance.

Interface: encoding.BinaryUnmarshaler

func (*Topic) UnmarshalBinaryReader

func (t *Topic) UnmarshalBinaryReader(r io.Reader) (err error)

UnmarshalBinaryReader populates Topic from an io.Reader returning the binary form.

func (*Topic) UnmarshalJSON

func (t *Topic) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON converts the JSON form to a Topic instance.

Interface: json.Unmarshal

Jump to

Keyboard shortcuts

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