Documentation ¶
Index ¶
Constants ¶
View Source
const ( CREATE PublishAction = "create" UPDATE PublishAction = "update" ERROR PublishAction = "error" TYPE_APIDEF SpecType = "apidef" TYPE_OAI SpecType = "oas" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInfo ¶
type APIInfo struct { File string `json:"file,omitempty"` APIID string `json:"api_id,omitempty"` DBID string `json:"db_id,omitempty"` ORGID string `json:"org_id,omitempty"` OAS struct { OverrideTarget string `json:"override_target,omitempty"` OverrideListenPath string `json:"override_listen_path,omitempty"` VersionName string `json:"version_name,omitempty"` StripListenPath bool `json:"strip_listen_path,omitempty"` } `json:"oas,omitempty"` }
type BaseGetter ¶
type BaseGetter struct { Getter // contains filtered or unexported fields }
type FSGetter ¶
type FSGetter struct { *BaseGetter Getter // contains filtered or unexported fields }
func (*FSGetter) FetchAPIDef ¶
func (gg *FSGetter) FetchAPIDef(spec *TykSourceSpec) ([]objects.DBApiDefinition, error)
func (*FSGetter) FetchPolicies ¶
func (gg *FSGetter) FetchPolicies(spec *TykSourceSpec) ([]objects.Policy, error)
func (*FSGetter) FetchTykSpec ¶
func (gg *FSGetter) FetchTykSpec() (*TykSourceSpec, error)
type Getter ¶
type Getter interface { FetchRepo() error FetchAPIDef(spec *TykSourceSpec) ([]objects.DBApiDefinition, error) FetchPolicies(spec *TykSourceSpec) ([]objects.Policy, error) FetchTykSpec() (*TykSourceSpec, error) }
type GitGetter ¶
type GitGetter struct { *BaseGetter Getter // contains filtered or unexported fields }
func NewGGetter ¶
func (*GitGetter) FetchAPIDef ¶
func (gg *GitGetter) FetchAPIDef(spec *TykSourceSpec) ([]objects.DBApiDefinition, error)
func (*GitGetter) FetchPolicies ¶
func (gg *GitGetter) FetchPolicies(spec *TykSourceSpec) ([]objects.Policy, error)
func (*GitGetter) FetchTykSpec ¶
func (gg *GitGetter) FetchTykSpec() (*TykSourceSpec, error)
type PolicyInfo ¶
type PublishAction ¶
type PublishAction string
type Publisher ¶
type Publisher interface { Name() string CreateAPIs(apiDefs *[]objects.DBApiDefinition) error UpdateAPIs(apiDefs *[]objects.DBApiDefinition) error SyncAPIs(apiDefs []objects.DBApiDefinition) error CreatePolicies(pols *[]objects.Policy) error UpdatePolicies(pols *[]objects.Policy) error SyncPolicies(pols []objects.Policy) error Reload() error }
type TykSourceSpec ¶
type TykSourceSpec struct { Type SpecType `json:"type,omitempty"` Files []APIInfo `json:"files,omitempty"` Policies []PolicyInfo `json:"policies,omitempty"` }
Click to show internal directories.
Click to hide internal directories.