types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResource

type CommonResource struct {
	Code         int         `json:"code"`
	Data         interface{} `json:"data,omitempty"`
	ErrorMessage string      `json:"err_msg,omitempty"`
}

type ResourceBodyFilterParameters

type ResourceBodyFilterParameters map[string]string

func (ResourceBodyFilterParameters) Check

func (bfp ResourceBodyFilterParameters) Check() error

type ResourceFilter

type ResourceFilter struct {
	Header ResourceHeaderFilterParameters `json:"header,omitempty"`
	Query  ResourceQueryFilterParameters  `json:"query,omitempty"`
	Body   ResourceBodyFilterParameters   `json:"body,omitempty"`
}

type ResourceHeaderFilterParameters

type ResourceHeaderFilterParameters map[string]string

func (ResourceHeaderFilterParameters) Check

type ResourceHeaderTemplate

type ResourceHeaderTemplate map[string]string

type ResourceQueryFilterParameters

type ResourceQueryFilterParameters map[string]string

func (ResourceQueryFilterParameters) Check

type ResourceRequestMatcher

type ResourceRequestMatcher struct {
	Path   string `json:"path"`
	Method string `json:"method"`
}

type ResourceResponseRegulation

type ResourceResponseRegulation struct {
	IsDefault bool                      `json:"is_default,omitempty"`
	Filter    *ResourceFilter           `json:"filter,omitempty"`
	Response  *ResourceResponseTemplate `json:"response"`
}

func (*ResourceResponseRegulation) Check

func (rmr *ResourceResponseRegulation) Check() error

type ResourceResponseRegulationSet

type ResourceResponseRegulationSet []*ResourceResponseRegulation

func (ResourceResponseRegulationSet) Check

func (*ResourceResponseRegulationSet) UnmarshalByte

func (rrr *ResourceResponseRegulationSet) UnmarshalByte(data []byte) error

type ResourceResponseTemplate

type ResourceResponseTemplate struct {
	IsTemplate     bool                   `json:"is_template,omitempty"`
	Header         ResourceHeaderTemplate `json:"header,omitempty"`
	StatusCode     int                    `json:"status_code,omitempty"`
	Body           string                 `json:"body,omitempty"`
	B64EncodedBody string                 `json:"base64encoded_body,omitempty"`
}

type ResourceRule

type ResourceRule struct {
	ID           string                         `json:"id,omitempty" ddb:"id"`
	Path         string                         `json:"path,omitempty" ddb:"path"`
	Method       string                         `json:"method,omitempty" ddb:"method"`
	Variable     *ResourceVariable              `json:"variable,omitempty" ddb:"variable"`
	Weight       *ResourceWeight                `json:"weight,omitempty" ddb:"weight"`
	Responses    *ResourceResponseRegulationSet `json:"responses,omitempty" ddb:"responses"`
	Version      int                            `json:"-" ddb:"version"`
	CreatedTime  time.Time                      `json:"-" ddb:"ctime"`
	ModifiedTime time.Time                      `json:"-" ddb:"mtime"`
	Disabled     bool                           `json:"-" ddb:"disabled"`
}

func (ResourceRule) Check

func (rr ResourceRule) Check() error

type ResourceVariable

type ResourceVariable map[string]interface{}

func (*ResourceVariable) UnmarshalByte

func (rv *ResourceVariable) UnmarshalByte(data []byte) error

type ResourceWeight

type ResourceWeight map[string]ResourceWeightingFactor

func (*ResourceWeight) UnmarshalByte

func (rw *ResourceWeight) UnmarshalByte(data []byte) error

type ResourceWeightingFactor

type ResourceWeightingFactor map[string]uint

Jump to

Keyboard shortcuts

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