types

package
v0.0.0-...-64a9ce5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FormatJson    = "json"
	FormatYaml    = "yaml"
	FormatDefault = FormatYaml
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus struct {
	CertificateAuthorityData string `json:"certificateAuthorityData,omitempty" yaml:"certificateAuthorityData,omitempty"`
	CertificateAuthority     string `json:"certificateAuthority,omitempty" yaml:"certificateAuthority,omitempty"`
	Addr                     string `json:"addr,omitempty" yaml:"addr,omitempty"`
}

type Context

type Context struct {
	Bus  string `json:"bus,omitempty" yaml:"bus,omitempty"`
	User string `json:"user,omitempty" yaml:"user,omitempty"`
}

type DataReport

type DataReport struct {
	MessageReport `yaml:",omitempty,inline" json:",omitempty"`
	Data          interface{} `yaml:",omitempty" json:"data,omitempty"`
}

type Dependencies

type Dependencies struct {
	Version       Version
	FileSystem    afero.Fs
	ProjectConfig *ProjectConfig
	GlobalConfig  GlobalConfig
	MessageReport *MessageReport
	RootNode      *graph.RootNode
	Factory       generic.Factory
	GlobalArgs    GlobalArgs
}

type Gen

type Gen struct {
	Tasks []RenderTask `json:"tasks,omitempty" yaml:"tasks,omitempty"`
	Sdks  []SdkConfig  `json:"sdks,omitempty" yaml:"sdks,omitempty"`
}

type GetArgs

type GetArgs struct {
	Host       string
	Password   string
	User       string
	TypePlural string
	Services   string
	Path       string
	Search     string
	Id         string
	Username   string
	Name       string
}

func (GetArgs) GetId

func (a GetArgs) GetId() (id mql.Id)

func (GetArgs) GetMode

func (a GetArgs) GetMode() (m mql.GetMode)

func (GetArgs) GetSvcFilter

func (a GetArgs) GetSvcFilter() mql.ServiceFilter

func (GetArgs) HasId

func (a GetArgs) HasId() bool

func (GetArgs) Validate

func (a GetArgs) Validate() (err error)

type GlobalArgs

type GlobalArgs struct {
	Output            string
	VerbosityLevel    int
	OutputFormat      string
	GlobalConfigPath  string
	ProjectConfigPath string
	Addr              string
	Token             string
	NoColor           bool
}

func (GlobalArgs) ReturnData

func (a GlobalArgs) ReturnData() (b bool)

type GlobalConfig

type GlobalConfig struct {
	V0 V0Global
}

type Index

type Index struct {
	Path         string `json:"path,omitempty" yaml:"path,omitempty"`
	NGramMinimum int    `json:"nGramMinimum,omitempty" yaml:"nGramMinimum,omitempty"`
	NGramMaximum int    `json:"nGramMinimum,omitempty" yaml:"nGramMinimum,omitempty"`
}

type IterateRenderContext

type IterateRenderContext struct {
	Version   *Version
	Data      map[string]interface{}
	BasicType *graph.BasicTypeNode
	Endpoint  *graph.EndpointNode
	Enum      *graph.EnumNode
	Field     *graph.FieldNode
	Relation  *graph.RelationNode
	Type      *graph.TypeNode
	Path      *graph.PathNode
}

type MessageReport

type MessageReport struct {
	Debug   []string `yaml:",omitempty" json:"debug,omitempty"`
	Info    []string `yaml:",omitempty" json:"info,omitempty"`
	Warning []string `yaml:",omitempty" json:"warning,omitempty"`
	Error   []string `yaml:",omitempty" json:"error,omitempty"`
	Hint    []string `yaml:",omitempty" json:"hint,omitempty"`
}

func (*MessageReport) AddDebug

func (r *MessageReport) AddDebug(any interface{})

func (*MessageReport) AddError

func (r *MessageReport) AddError(any interface{})

func (*MessageReport) AddHint

func (r *MessageReport) AddHint(any interface{})

func (*MessageReport) AddInfo

func (r *MessageReport) AddInfo(any interface{})

func (*MessageReport) AddWarning

func (r *MessageReport) AddWarning(any interface{})

type NamedBus

type NamedBus struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Bus  Bus    `json:"bus,omitempty" yaml:"bus,omitempty"`
}

type NamedContext

type NamedContext struct {
	Name    string  `json:"name,omitempty" yaml:"name,omitempty"`
	Context Context `json:"context,omitempty" yaml:"context,omitempty"`
}

type NamedUser

type NamedUser struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	User User   `json:"user,omitempty" yaml:"user,omitempty"`
}

type NodeFilters

type NodeFilters struct {
	BasicTypes *graph.Filter `yaml:"basicTypes"`
	Endpoints  *graph.Filter `yaml:"endpoints"`
	Enums      *graph.Filter `yaml:"enum"`
	Fields     *graph.Filter `yaml:"fields"`
	Relations  *graph.Filter `yaml:"relations"`
	Types      *graph.Filter `yaml:"types"`
}

type Output

type Output struct {
	Text string
	Data interface{}
}

type ProjectConfig

type ProjectConfig struct {
	V0 V0Project `json:"v0,omitempty" yaml:"v0,omitempty"`
}

type RenderContext

type RenderContext struct {
	Version    *Version
	Data       map[string]interface{}
	BasicTypes graph.BasicTypeNodeMap
	Endpoints  graph.EndpointNodeMap
	Enums      graph.EnumNodeMap
	Fields     graph.FieldNodeMap
	Relations  graph.RelationNodeMap
	Types      graph.TypeNodeMap
	Paths      graph.PathNodeMap
}

type RenderTask

type RenderTask struct {
	Name         *string                 `yaml:"name"`
	Template     *string                 `yaml:"template"`
	TemplateData *string                 `yaml:"templateData"`
	Out          *string                 `yaml:"out"`
	Filter       *NodeFilters            `yaml:"select"`
	Dependencies *RenderTaskDependencies `yaml:"dependencies"`
	Iterate      *string                 `yaml:"iterate"`
	Data         map[string]interface{}  `yaml:"data"`
	Reset        *bool                   `yaml:"reset"`
}

type RenderTaskDependencies

type RenderTaskDependencies struct {
	Endpoints *graph.Filter `yaml:"endpoints"`
	Types     *graph.Filter `yaml:"types"`
}

type SdkConfig

type SdkConfig struct {
	Name      string                 `json:"name,omitempty" yaml:"name,omitempty"`
	Args      map[string]interface{} `json:"args,omitempty" yaml:"args,omitempty"`
	Endpoints []string               `json:"endpoints,omitempty" yaml:"endpoints,omitempty"`
}

type SdkGenerator

type SdkGenerator struct {
	Name         string                                     `json:"name,omitempty" yaml:"name,omitempty"`
	Description  string                                     `json:"description,omitempty" yaml:"description,omitempty"`
	Init         func(*SdkGenerator, SdkConfig) (err error) `json:"-" yaml:"-"`
	Reset        func(SdkConfig) (err error)                `json:"-" yaml:"-"`
	Tasks        []RenderTask                               `json:"tasks,omitempty" yaml:"tasks,omitempty"`
	Dependencies []RenderTask                               `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
}

type User

type User struct {
	ClientCertificate     string `json:"clientCertificate,omitempty" yaml:"clientCertificate,omitempty"`
	ClientCertificateData string `json:"clientCertificateData,omitempty" yaml:"clientCertificateData,omitempty"`
	ClientToken           string `json:"clientToken,omitempty" yaml:"clientToken,omitempty"`
	ClientTokenData       string `json:"clientTokenData,omitempty" yaml:"clientTokenData,omitempty"`
}

type V0Global

type V0Global struct {
	Index          Index          `json:"index,omitempty" yaml:"index,omitempty"`
	Buses          []NamedBus     `json:"buses,omitempty" yaml:"buses,omitempty"`
	Users          []NamedUser    `json:"users,omitempty" yaml:"users,omitempty"`
	Contexts       []NamedContext `json:"contexts,omitempty" yaml:"contexts,omitempty"`
	CurrentContext string         `json:"currentContext,omitempty" yaml:"currentContext,omitempty"`
}

type V0Project

type V0Project struct {
	Gen Gen `json:"gen,omitempty" yaml:"gen,omitempty"`
}

type Version

type Version struct {
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	Commit  string `json:"commit,omitempty" yaml:"commit,omitempty"`
	Date    string `json:"date,omitempty" yaml:"date,omitempty"`
}

Jump to

Keyboard shortcuts

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