Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GrpcServer *grpc.Server
GrpcServer need to be call from the main file of the service, to launch the grpc server.
Functions ¶
func NewServer ¶
func NewServer(tracer opentracing.Tracer)
Types ¶
type ArgData ¶
ArgData represent the argument of a custom function, in a format usable by templates.
type CustomFunc ¶
CustomFunc represent a custom function.
func (*CustomFunc) GetCustomFuncData ¶
func (c *CustomFunc) GetCustomFuncData() *CustomFuncData
GetCustomFuncData return the custom function information, in a format usable by templates.
type CustomFuncData ¶
CustomFuncData represent a custom function, in a format usable by templates.
type Definition ¶
type Definition struct { ORM *liborm.Definition CustomFuncs []*liborm.CustomFunc // contains filtered or unexported fields }
Definition is used to declare the information of a model, so it can generate its code.
func (*Definition) GetCustomFuncByName ¶
func (d *Definition) GetCustomFuncByName(name string) *liborm.CustomFunc
GetCustomFuncByName return the custom function by it's name
type Definitions ¶
type Definitions struct { Prefix string Repository string // contains filtered or unexported fields }
Definitions contains all the grpc definitions in the service.
func (*Definitions) GenClient ¶
func (defs *Definitions) GenClient()
GenClient will generate the grpc client files. nolint: dupl
func (*Definitions) GenProtos ¶
func (defs *Definitions) GenProtos()
GenProtos will generate the grpc proto files.
func (*Definitions) GenServer ¶
func (defs *Definitions) GenServer()
GenServer will generate the grpc server files. nolint: dupl
func (*Definitions) GetByID ¶
func (ds *Definitions) GetByID(id string) *Definition
GetByID return the specified definition by its ID.
func (*Definitions) Register ¶
func (ds *Definitions) Register(d *Definition)
Register is used to register a new definition into the service.
func (*Definitions) Slice ¶
func (ds *Definitions) Slice() []*Definition
Slice return the definitions as a slice.