messagegenerator

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	String FieldType = "string"
	Int              = "int"
	Float            = "float"
	Time             = "time"
)

Variables

This section is empty.

Functions

func NewMessageGenerator

func NewMessageGenerator(content string) generator

Types

type Field

type Field struct {
	Name  string    `json:"name"`
	Type  FieldType `json:"type"`
	Rules Rule      `json:"rules"`
}

type FieldFormat

type FieldFormat string
const (
	UUID FieldFormat = "uuid"
)

type FieldType

type FieldType string

type Message

type Message struct {
	Fields []Field `json:"fields"`
}

type MessageJsonRepresentation

type MessageJsonRepresentation struct {
	Message Message `json:"message"`
}

type Rule

type Rule struct {
	Format     FieldFormat `json:"format"`
	Min        interface{} `json:"min"`
	Max        interface{} `json:"max"`
	StartsWith string      `json"startsWith"`
	EndsWith   string      `json"endsWith"`
}

Jump to

Keyboard shortcuts

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