provider

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedProvider = errors.New("unsupported provider")

ErrUnsupportedProvider is returned when the provider is not supported.

Functions

This section is empty.

Types

type Provider

type Provider string

Provider represents the database provider.

var (
	Mysql    Provider = "mysql"
	Postgres Provider = "postgres"
	Sqlite   Provider = "sqlite"
)

Available providers.

func ParseFromString

func ParseFromString(provider string) Provider

ParseFromString parses the Provider from the protobuf options.

func (Provider) String

func (p Provider) String() string

String returns the provider as a string.

type TemplateBuilder

type TemplateBuilder interface {
	// GetInitStatement returns the initialization statement.
	GetInitStatement(*statepkg.State) (statepkg.Templater, error)
	// GetEntities returns the entities.
	GetEntities(*statepkg.State) ([]statepkg.Templater, error)
	// GetFinalizeStatement returns the finalization statement.
	GetFinalizeStatement(*statepkg.State) (statepkg.Templater, error)
}

TemplateBuilder is a type for providing content. It is used to build the template.

func GetTemplateBuilder

func GetTemplateBuilder(request *plugingo.CodeGeneratorRequest) (TemplateBuilder, error)

GetTemplateBuilder returns the TemplateBuilder for the given provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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