Version: v0.1.1 Latest Latest

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 8 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type BaseBackend

type BaseBackend interface {
	Execute(Endpoint) (*bytes.Buffer, *bytes.Buffer, error)

type Cache

type Cache struct {
	Enabled bool          `yaml:"enabled"`
	Expire  time.Duration `yaml:"expire"`
	Store   *cache.Cache

func (Cache) GetStdout

func (c Cache) GetStdout(key string) (*bytes.Buffer, bool)

func (Cache) SetStdout

func (c Cache) SetStdout(key string, val *bytes.Buffer)

type Choice

type Choice struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`

type Config

type Config struct {
	BaseURL    string `yaml:"baseURL"`
	Host       string
	Port       string
	HealthPath string     `yaml:"healthcheckPath"`
	Backend    string     `yaml:"backend"`
	Endpoints  []Endpoint `yaml:"endpoints"`

func (*Config) GenServerURI

func (c *Config) GenServerURI() string

type Container

type Container struct {
	Name    string   `yaml:"name"`
	Image   string   `yaml:"image"`
	Command []string `yaml:"command"` // contains go template


type Endpoint

type Endpoint struct {
	Path        string      `yaml:"path"`
	Method      string      `yaml:"method"`
	Cache       Cache       `yaml:"cache"`
	Async       bool        `yaml:"async"`
	Form        bool        `yaml:"form"`
	TemplateURL string      `yaml:"template_url"`
	Response    string      `yaml:"response"`
	Params      []Param     `yaml:"params"`
	SecretName  string      `yaml:"secretName"`
	Env         []string    `yaml:"env"`
	Containers  []Container `yaml:"containers"`

func (*Endpoint) BuildCommand

func (e *Endpoint) BuildCommand(c Container) []string

BuildCommand build command with params

func (*Endpoint) BuildEnv

func (e *Endpoint) BuildEnv() []string

type Param

type Param struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Type        string   `yaml:"type"`
	Value       string   `yaml:"default"`
	Choices     []Choice `yaml:"choice"`
	Optional    bool     `yaml:"optional"`

Source Files

Jump to

Keyboard shortcuts

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