types

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package types contains all the common types and interfaces for generating flag accessors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTmplData

type BaseTmplData struct {
	OutputPath string
	Flags      []*FlagTmplData
}

BaseTmplData is the base for all OpenFeature code generation.

type FlagTmplData

type FlagTmplData struct {
	Name         string
	Type         FlagType
	DefaultValue string
	Docs         string
}

FlagTmplData is the per-flag specific data. It represents a common interface between Mendel source and codegen file output.

type FlagType

type FlagType int

FlagType are the primitive types of flags.

const (
	UnknownFlagType FlagType = iota
	IntType
	FloatType
	BoolType
	StringType
	ObjectType
)

Collection of the different kinds of flag types

type Generator

type Generator interface {
	Generate(input Input) error
	SupportedFlagTypes() map[FlagType]bool
}

Generator provides interface to generate language specific, strongly-typed flag accessors.

type Input

type Input struct {
	BaseData *BaseTmplData
}

type TmplDataInterface

type TmplDataInterface interface {
	// BaseTmplDataInfo returns a pointer to a BaseTmplData struct containing
	// all the relevant information needed for metadata construction.
	BaseTmplDataInfo() *BaseTmplData
}

Jump to

Keyboard shortcuts

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