generator

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureAcronym added in v0.3.1

func ConfigureAcronym(key, val string)

ConfigureAcronym allows you to add additional words which will be considered acronyms

func Generate

func Generate(config Config) error

Generate dataloader file without a file name prefix

func IsStructType added in v0.4.4

func IsStructType(t string) bool

func LoadAllMarshalType added in v0.4.7

func LoadAllMarshalType(t string) string

LoadAllMarshalType returns the code to handle marshaling the given type from a string in LoadAll

func LoadThunkMarshalType added in v0.4.4

func LoadThunkMarshalType(t string) string

LoadThunkMarshalType returns the code to handle marshaling the given type from a string in LoadThunk

func LoadThunkMissReturnType added in v0.4.0

func LoadThunkMissReturnType(t string) string

LoadThunkMissReturnType returns the default value for the given type

func ToCamel added in v0.3.1

func ToCamel(s string) string

ToCamel converts a string to CamelCase

func ToLowerCamel added in v0.3.1

func ToLowerCamel(s string) string

ToLowerCamel converts a string to lowerCamelCase

func ToRedisKey added in v0.4.4

func ToRedisKey(t string) string

ToRedisKey returns the code to convert the given key to a string for use as a redis key

Types

type Config added in v0.4.0

type Config struct {
	FileNamePrefix         string
	LoaderName             string
	KeyType                string
	ValueType              string
	WorkingDirectory       string
	DisableCacheExpiration bool
}

Config is the configuration for the generator

Jump to

Keyboard shortcuts

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