model

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillModel

func FillModel(file *protogen.File, g *protogen.GeneratedFile, m *protogen.Message)

FillModel fills the in global loadedModels with parsed data

func GetModels

func GetModels() map[string]*Model

GetModels

func ResetModels

func ResetModels()

ResetModels reset the internal data

Types

type Key added in v0.3.9

type Key struct {
	PKs    []string
	CKs    []string
	Orders []string
}

func (*Key) Checksum added in v0.3.9

func (k *Key) Checksum() uint32

func (*Key) ChecksumPKs added in v0.3.9

func (k *Key) ChecksumPKs(keyPrefix string, sep string, lowerCamel bool) uint32

func (*Key) Keys added in v0.3.9

func (k *Key) Keys() []string

func (*Key) String added in v0.3.9

func (k *Key) String(prefix string, sep string, lowerCamel bool) string

func (*Key) StringPKs added in v0.3.9

func (k *Key) StringPKs(prefix string, sep string, lowerCamel bool) string

type Model

type Model struct {
	Type       string
	Name       string
	Table      Key
	Views      []Key
	ViewParams []string
	FieldNames []string
	FieldsCql  map[string]string
	FieldsGo   map[string]string
}

func (*Model) FuncArgs added in v0.2.7

func (m *Model) FuncArgs(key Key, onlyPKs bool) string

func (*Model) FuncArgsWithPrefix added in v0.3.6

func (m *Model) FuncArgsWithPrefix(prefix string, pk Key, onlyPKs bool) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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