Documentation
¶
Index ¶
- Constants
- type APIKey
- type APIKeys
- type Compression
- type Container
- type Cors
- type Handler
- type Item
- type Logger
- type Parameter
- type Path
- type Redirect
- type Resource
- type Service
- func (s *Service) Append(paths *Item)
- func (s *Service) FormatURL(URI string) string
- func (s *Service) GetPaths() Container
- func (s *Service) IncreaseVersion()
- func (s *Service) Init(ctx context.Context) (err error)
- func (s *Service) IsCheckDue(t time.Time) bool
- func (s *Service) Lookup(aPath *contract.Path) *Path
- func (s *Service) SyncChanges(ctx context.Context) (bool, error)
- type Settings
- type ViewRef
Constants ¶
View Source
const (
PathFileName = "paths.yaml"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type Compression ¶
type Compression struct {
MinSizeKb int `yaml:"MinSizeKb,omitempty"`
}
type Cors ¶
type Cors struct { AllowCredentials *bool `yaml:"AllowCredentials,omitempty"` AllowHeaders *[]string `yaml:"AllowHeaders,omitempty"` AllowMethods *[]string `yaml:"AllowMethods,omitempty"` AllowOrigins *[]string `yaml:"AllowOrigins,omitempty"` ExposeHeaders *[]string `yaml:"ExposeHeaders,omitempty"` MaxAge *int64 `yaml:"MaxAge,omitempty"` }
func DefaultCors ¶
func DefaultCors() *Cors
type Item ¶
type Item struct { SourceURL string `yaml:"SourceURL"` MessageBus string `json:"MessageBus,omitempty" yaml:"MessageBus,omitempty" ` Paths []*Path `yaml:"Routes" json:"Routes"` Settings `yaml:",inline"` Resource *Resource `yaml:"Resource,omitempty" json:"Resource,omitempty"` // optional resource for the path Version version.Control `yaml:"-" json:"-"` }
type Parameter ¶ added in v0.15.4
type Parameter struct { Name string `json:"name" yaml:"Name"` // Name of the parameter In *state.Location `json:",omitempty" yaml:"In" ` Required bool `json:"required,omitempty" yaml:"Required,omitempty"` // Required indicates if the parameter is required Schema *state.Schema `json:"schema" yaml:"Schema"` Predicate []*extension.PredicateConfig `json:",omitempty" yaml:"Predicates"` }
type Path ¶
type Path struct { contract.Path `yaml:",inline"` Settings `yaml:",inline"` contract.Meta `yaml:",inline"` contract.ModelContextProtocol `yaml:",inline"` Handler *Handler `yaml:"Handler" json:"Handler"` Internal bool `json:"Internal,omitempty" yaml:"Internal,omitempty" ` Connector string `json:",omitempty"` ContentURL string `json:"ContentURL,omitempty" yaml:"ContentURL,omitempty" ` View *ViewRef `yaml:"View" json:"View"` // View is the shared resource view for this path, used for OpenAPI generation SourceURL string `yaml:"-" json:"-"` Version *version.Control `yaml:"-" json:"-"` }
func (*Path) CorsEnabled ¶
func (*Path) IsRevealMetric ¶
type Redirect ¶
type Redirect struct { StorageURL string `yaml:"StorageURL,omitempty"` ///github.com/viant/datly/v0/app/lambda/lambda/proxy.go MinSizeKb int `yaml:"MinSizeKb,omitempty"` TimeToLiveMs int `yaml:"TimeToLiveMs,omitempty"` }
func (*Redirect) TimeToLive ¶
type Resource ¶ added in v0.15.4
type Resource struct { Parameters []*Parameter `json:",omitempty" yaml:"Parameters,omitempty"` // Parameters for the resource, used for OpenAPI generation Types []*view.TypeDefinition `json:",omitempty" yaml:"Types,omitempty"` // Type definitions for the resource, used for OpenAPI generation }
type Service ¶
type Service struct { Container Container URL string MbusPaths []*Path // contains filtered or unexported fields }
func (*Service) IncreaseVersion ¶
func (s *Service) IncreaseVersion()
IncreaseVersion increase version of the all routes
type Settings ¶
type Settings struct { APIKey *APIKey `json:",omitempty" yaml:"APIKey,omitempty"` Cors *Cors `json:",omitempty" yaml:"Cors,omitempty"` Compression *Compression `json:",omitempty" yaml:"Compression,omitempty"` Redirect *Redirect `json:",omitempty" yaml:"PreSign,omitempty"` Logger *Logger `json:",omitempty" yaml:"Logger,omitempty"` RevealMetric *bool With []string `yaml:"With" json:"With"` }
Click to show internal directories.
Click to hide internal directories.