Documentation ¶
Index ¶
- type Arguments
- type Auth
- type Build
- type Bundle
- type CacheProvider
- type CacheWarmup
- type ConfigURL
- type ConfigURLs
- type Connector
- type CustomAuth
- type Datly
- type Extension
- type Generate
- func (g *Generate) DSQLLocation() string
- func (g *Generate) EmbedLocation(URI string, methodFragment string) string
- func (g *Generate) EntityLocation(prefix, methodFragment, entityName string) string
- func (g *Generate) HandlerLocation(prefix string, methodFragment string) string
- func (g *Generate) HandlerType(methodFragment string) string
- func (g *Generate) HttpMethod() string
- func (g *Generate) IndexLocation(prefix string, methodFragment string) string
- func (g *Generate) Init() error
- func (g *Generate) InitLocation(prefix string, methodFragment string) string
- func (g *Generate) InputInitLocation(prefix string, methodFragment string) string
- func (g *Generate) InputLocation(prefix string, methodFragment string) string
- func (g *Generate) InputType(methodFragment string) string
- func (g *Generate) InputValidateLocation(prefix string, methodFragment string) string
- func (g *Generate) OutputLocation(prefix string, methodFragment string) string
- func (g *Generate) OutputType(methodFragment string) string
- type GoBuild
- type Init
- type Mbus
- type Module
- type Options
- type Plugin
- type Repository
- type Router
- type Rule
- func (r *Rule) BaseRuleURL() string
- func (r *Rule) ComponentPath() string
- func (r *Rule) GoCodeLocation() string
- func (r *Rule) GoModuleLocation() string
- func (r *Rule) ImportPackage() string
- func (r *Rule) ImportType(aType string) string
- func (r *Rule) Init() error
- func (r *Rule) LoadSource(ctx context.Context, fs afs.Service, URL string) (string, error)
- func (r *Rule) ModFileLocation(ctx context.Context) string
- func (r *Rule) Module() (*modfile.Module, error)
- func (r *Rule) NormalizeComponent(dSQL *string)
- func (r *Rule) NormalizeSQL(SQL string, option func() sqlparser.Option) string
- func (r *Rule) Package() string
- func (r *Rule) RuleName() string
- func (r *Rule) SourceDirectory() string
- func (r *Rule) SourceURL() string
- type Run
- type Touch
- type Translate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶ added in v0.9.0
type Auth struct { HMAC string `short:"A" long:"jwtHMAC" description:"HMACKeyPath|EncKey" ` RSA string `short:"J" long:"jwtRSA" description:"PublicKeyPath|EncKey" ` Firebase string `short:"F" long:"fsecret" description:"Firebase secrets" ` Custom CustomAuth `short:"E" long:"customAuth" description:"Custom AuthSQL" ` }
type Build ¶
type Bundle ¶
type CacheProvider ¶
type CacheProvider struct { Location string `short:"l" long:"cloc" description:"cache location" default:"${view.Name}" ` Name string `short:"n" long:"cname" description:"cache name" default:"aero" ` ProviderURL string `short:"u" long:"curl" description:"cache provider url" ` TimeToLiveMs int `short:"t" long:"cttl" description:"cache time to live ms" default:"3600000"` }
func (CacheProvider) Init ¶
func (c CacheProvider) Init() error
type CacheWarmup ¶
type ConfigURLs ¶
type ConfigURLs []ConfigURL
func (*ConfigURLs) Append ¶
func (c *ConfigURLs) Append(URL string)
func (ConfigURLs) Repository ¶
func (c ConfigURLs) Repository() string
func (ConfigURLs) URL ¶
func (c ConfigURLs) URL() string
func (ConfigURLs) URLs ¶
func (c ConfigURLs) URLs() []string
type Connector ¶
type Connector struct {
Connectors []string `short:"c" long:"conn" description:"name|driver|dsn|secretUrl|key" `
}
type CustomAuth ¶ added in v0.9.0
type CustomAuth string
func (*CustomAuth) ShiftInt ¶ added in v0.9.0
func (c *CustomAuth) ShiftInt() (int, error)
func (*CustomAuth) ShiftString ¶ added in v0.9.0
func (c *CustomAuth) ShiftString() string
func (*CustomAuth) Size ¶ added in v0.9.0
func (c *CustomAuth) Size() int
type Extension ¶
type Extension struct { Project string `short:"p" long:"proj" description:"destination project"` Module Datly }
func (*Extension) GoModInitArgs ¶
func (*Extension) PackageLocation ¶
type Generate ¶
type Generate struct { Repository Rule Dest string `short:"d" long:"dest" description:"dql file location" default:"dql"` Operation string `short:"o" long:"op" description:"operation" choice:"post" choice:"patch" choice:"put" choice:"get"` Kind string `short:"k" long:"kind" description:"execution kind" choice:"dml" choice:"service"` Lang string `short:"l" long:"lang" description:"lang" choice:"velty" choice:"go"` Translate bool `short:"t" long:"translate" description:"translate generated DSQL"` NoComponentDef bool `short:"Z" long:"noComDef" description:"do not include component definition" ` }
func (*Generate) DSQLLocation ¶
func (*Generate) EmbedLocation ¶
func (*Generate) EntityLocation ¶
func (*Generate) HandlerLocation ¶
func (*Generate) HandlerType ¶
func (*Generate) HttpMethod ¶
func (*Generate) IndexLocation ¶
func (*Generate) InitLocation ¶
func (*Generate) InputInitLocation ¶ added in v0.10.0
func (*Generate) InputLocation ¶
func (*Generate) InputValidateLocation ¶ added in v0.10.0
func (*Generate) OutputLocation ¶
func (*Generate) OutputType ¶
type GoBuild ¶
type GoBuild struct { Project string `short:"p" long:"proj" description:"project"` Module string `short:"m" long:"module" description:"custom go module location" default:"pkg" ` Extension string `short:"e" long:"ext" description:"extension replace project" default:".build/ext"` Datly string `short:"l" long:"xdatly" description:"custom extended datly location" default:".build/datly"` MainPath string `short:"M" long:"main" description:"main path"` Name string `short:"n" long:"name" description:"git module name" ` Source []string `short:"s" long:"source" description:"source locations"` DestURL string `short:"d" long:"dest" description:"dest location"` BuildArgs []string `short:"b" long:"buildArgs" description:"build args"` GoVersion string `short:"v" long:"goVer" description:"build go Version"` GoOs string `short:"o" long:"goOs" description:"plugin OS"` GoArch string `short:"a" long:"goArch" description:"plugin ARCH"` GoPath string `short:"P" long:"goPath" description:"go path"` GoRoot string `short:"R" long:"goRoot" description:"go root"` }
type Init ¶
type Init struct { Project string `short:"p" long:"proj" description:"project location"` Repository CacheProvider }
type Mbus ¶
type Mbus struct {
MBuses []string `short:"b" long:"mbus" description:"name|vendor|resourceType|uri[|region|secretURL|secretKey]" `
}
type Module ¶
type Options ¶
type Options struct { InitExt *Extension `command:"initExt" description:"initialises datly extension project" ` Build *Build `command:"build" description:"build custom datly binary" ` Plugin *Plugin `command:"plugin" description:"build custom datly rule plugin" ` Generate *Generate `command:"gen" description:"generate dql for put,patch or post operation" ` Translate *Translate `command:"translate" description:"translate dql into datly repository rule"` Cache *CacheWarmup `command:"cache" description:"warmup cache"` Run *Run `command:"run" description:"start datly in standalone mode"` Bundle *Bundle `command:"bundle" description:"bundles rules for cloud deployment (speed/cost optimization)"` InitCmd *Init `command:"init" description:"init datly rule repository"` Touch *Touch `command:"touch" description:"forces route rule sync"` Version bool `short:"v" long:"version" description:"datly version" ` }
func NewOptions ¶
func (*Options) ConfigURLs ¶
func (*Options) Connectors ¶
func (*Options) Repository ¶
func (o *Options) Repository() *Repository
func (*Options) ShallTranslate ¶
func (*Options) UpdateTranslate ¶
func (o *Options) UpdateTranslate()
type Plugin ¶
type Plugin struct { GoBuild Repository string `short:"r" long:"repo" description:"rule repository location"` }
func (*Plugin) IsRepositoryPlugin ¶
type Repository ¶
type Repository struct { Connector Mbus Auth ProjectURL string RepositoryURL string `short:"r" long:"repo" description:"datly rule repository location" default:"repo/dev" ` ConstURL string `short:"O" long:"const" description:"const location" ` SubstitutesURL []string `short:"S" long:"subs" description:"substitutes location" ` Profile string `short:"X" long:"profile" description:"substitutes profile" ` Port *int `short:"P" long:"port" description:"endpoint port" ` APIPrefix string `short:"a" long:"api" description:"api prefix" default:"/v1/api" ` Configs ConfigURLs `short:"C" long:"config" description:"config url" ` CacheConnectorPrefix string `short:"H" long:"cprefix" description:"cache prefix"` LoadPlugin bool `short:"L" long:"lplugin" description:"load plugin"` }
type Rule ¶
type Rule struct { Project string `short:"p" long:"proj" description:"project location"` Name string `short:"n" long:"name" description:"rule name"` ModulePrefix string `short:"u" long:"namespace" description:"rule uri/namespace" default:"dev" ` Source []string `short:"s" long:"src" description:"source"` Packages []string `short:"g" long:"pkg" description:"entity package"` Output []string Index int ModuleLocation string `short:"m" long:"module" description:"go module package root" default:"pkg"` Generated bool SkipCompDef bool `short:"B" long:"sComp" description:"skip component def"` // contains filtered or unexported fields }
func (*Rule) BaseRuleURL ¶
func (*Rule) ComponentPath ¶ added in v0.9.8
func (*Rule) GoCodeLocation ¶
func (*Rule) GoModuleLocation ¶
func (*Rule) ImportPackage ¶
func (*Rule) ImportType ¶
func (*Rule) LoadSource ¶
func (*Rule) NormalizeComponent ¶
func (*Rule) NormalizeSQL ¶
func (*Rule) SourceDirectory ¶
type Run ¶
type Run struct { ConfigURL string `short:"c" long:"conf" description:"datly config"` WarmupURIs []string `short:"w" long:"warmup" description:"warmup uris"` JobURL string `short:"z" long:"joburl" description:"job url"` MaxJobs int `short:"W" long:"mjobs" description:"max jobs" default:"40" ` FailedJobURL string `short:"F" long:"fjobs" description:"failed jobs" ` LoadPlugin bool `short:"L" long:"lplugin" description:"load plugin"` PluginInfo string }
Click to show internal directories.
Click to hide internal directories.