codegen

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(config Config) error

Generate generates a Helm API for the given configuration

Types

type Config

type Config struct {
	Path    string        `yaml:"path,omitempty"`
	Package string        `yaml:"package,omitempty"`
	Stores  []StoreConfig `yaml:"stores"`
}

Config is the store generator configuration

type DataTypeOptions

type DataTypeOptions struct {
	Package PackageOptions
	Name    string
}

DataTypeOptions is the options for a store data type

type ImplOptions

type ImplOptions struct {
	Location LocationOptions
	Package  PackageOptions
	Type     TypeOptions
	Storage  StorageOptions
}

ImplOptions is the options for a store implementation

type InterfaceOptions

type InterfaceOptions struct {
	Location LocationOptions
	Package  PackageOptions
	Type     TypeOptions
}

InterfaceOptions is the options for a store interface

type LocationOptions

type LocationOptions struct {
	Path string
	File string
}

LocationOptions is the location of a code file

type MessageStoreConfig

type MessageStoreConfig struct {
	Type MessageTypeConfig `yaml:"type,omitempty"`
}

MessageStoreConfig is a store generator configuration for message stores

type MessageTypeConfig

type MessageTypeConfig struct {
	Package string `yaml:"package,omitempty"`
	Name    string `yaml:"name,omitempty"`
}

MessageTypeConfig is a store generator data type configuration

type Options

type Options struct {
	Stores map[string]StoreOptions
}

Options is code generator options

type PackageOptions

type PackageOptions struct {
	Name  string
	Path  string
	Alias string
}

PackageOptions is the package for a code file

type StorageConfig

type StorageConfig struct {
	Type   StorageType `yaml:"type,omitempty"`
	Name   string      `yaml:"name,omitempty"`
	Cached bool        `yaml:"cached,omitempty"`
}

StorageConfig is a store generator storage configuration

type StorageOptions

type StorageOptions struct {
	Type      string
	Primitive string
	Cached    bool
}

StorageOptions is the options for a store primitive

type StorageType

type StorageType string

StorageType is the type of a storage backend

type StoreConfig

type StoreConfig struct {
	Name    string              `yaml:"name,omitempty"`
	Package string              `yaml:"package,omitempty"`
	Message *MessageStoreConfig `yaml:"message,omitempty"`
	Storage StorageConfig       `yaml:"storage,omitempty"`
	Target  TargetConfig        `yaml:"target,omitempty"`
}

StoreConfig is a store generator store configuration

type StoreOptions

type StoreOptions struct {
	DataType  DataTypeOptions
	Interface InterfaceOptions
	Impl      ImplOptions
}

StoreOptions is the options for a store

type TargetConfig

type TargetConfig struct {
	Package string `yaml:"package,omitempty"`
}

TargetConfig is a store generator target configuration

type TypeOptions

type TypeOptions struct {
	Name string
}

TypeOptions is the options for a store type

Jump to

Keyboard shortcuts

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