common

package
v0.47.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventTypeMetadata added in v0.36.0

type EventTypeMetadata struct {
	Doc    string
	Fields []string
}

EventTypeMetadata is used to iterate over the model from the event types

func NewEventTypeMetada added in v0.36.0

func NewEventTypeMetada(fields ...string) *EventTypeMetadata

NewEventTypeMetada returns a new EventTypeMetada

type Module

type Module struct {
	Name                   string
	SourcePkgPrefix        string
	SourcePkg              string
	TargetPkg              string
	BuildTags              []string
	FieldHandlersBuildTags []string
	Fields                 map[string]*StructField // only exposed fields by SECL
	AllFields              map[string]*StructField
	Iterators              map[string]*StructField
	EventTypes             map[string]*EventTypeMetadata
	Mock                   bool
	Platform               Platform
}

Module represents everything needed to generate the accessors for a specific module (fields, build tags, ...)

type Platform added in v0.45.0

type Platform string

Platform defines which platform a structure is associated with

const (
	Unspecified Platform = "unspecified"
	Linux       Platform = "linux"
	Windows     Platform = "windows"
)

type StructField

type StructField struct {
	Name                string
	Prefix              string
	Struct              string
	BasicType           string
	ReturnType          string
	IsArray             bool
	IsLength            bool
	Event               string
	Handler             string
	CachelessResolution bool
	SkipADResolution    bool
	OrigType            string
	IsOrigTypePtr       bool
	Iterator            *StructField
	Weight              int64
	CommentText         string
	OpOverrides         string
	Check               string
	Alias               string
	AliasPrefix         string
}

StructField represents a structure field for which an accessor will be generated

func (*StructField) GetArrayPrefix added in v0.36.0

func (sf *StructField) GetArrayPrefix() string

GetArrayPrefix returns the array prefix of this field

func (*StructField) GetCacheName added in v0.44.0

func (sf *StructField) GetCacheName() string

GetCacheName returns the cache name

func (*StructField) GetDefaultReturnValue added in v0.42.0

func (sf *StructField) GetDefaultReturnValue() string

GetDefaultReturnValue returns default value for the given return type

func (*StructField) GetDefaultScalarReturnValue added in v0.42.0

func (sf *StructField) GetDefaultScalarReturnValue() string

GetDefaultScalarReturnValue returns default scalar value for the given return type

func (*StructField) GetEvaluatorType added in v0.36.0

func (sf *StructField) GetEvaluatorType() string

GetEvaluatorType returns the evaluator type name

Jump to

Keyboard shortcuts

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