cache

package
v3.3.24 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIfMissing

func AppendIfMissing(slice []string, v string) []string

func EnhanceModelsWithInformation

func EnhanceModelsWithInformation(
	backend structs.Config,
	enums []*structs.Enum,
	cfg *config.Config,
	boilerModels []*structs.BoilerModel,
	models []*structs.Model,
	ignoreTypePrefixes []string) []*structs.Model

func FindBoilerModel

func FindBoilerModel(models []*structs.BoilerModel, modelName string) *structs.BoilerModel

func GetBoilerModels

func GetBoilerModels(dir string) ([]*structs.BoilerModel, []*structs.BoilerEnum)

parseModelsAndFieldsFromBoiler since these are like User.ID, User.Organization and we want them grouped by modelName and their belonging fields.

func IsFirstCharacterLowerCase

func IsFirstCharacterLowerCase(s string) bool

func IsPlural

func IsPlural(s string) bool

func IsSingular

func IsSingular(s string) bool

func Plural

func Plural(s string) string

TaskBlockedBy -> TaskBlockedBies Person -> Persons Person -> People

func Singular

func Singular(s string) string

TaskBlockedBies -> TaskBlockedBy People -> Person

func SliceContains

func SliceContains(slice []string, v string) bool

Types

type BoilerCache

type BoilerCache struct {
	BoilerModels []*structs.BoilerModel
	BoilerEnums  []*structs.BoilerEnum
}

func InitializeBoilerCache

func InitializeBoilerCache(backend structs.Config) *BoilerCache

type ModelCache

type ModelCache struct {
	Models     []*structs.Model
	Interfaces []*structs.Interface
	Enums      []*structs.Enum
	Backend    structs.Config
	Frontend   structs.Config
	Output     structs.Config
	Scalars    []string
}

func InitializeModelCache

func InitializeModelCache(config *config.Config, boilerCache *BoilerCache, output structs.Config, backend structs.Config, frontend structs.Config) *ModelCache

Jump to

Keyboard shortcuts

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