client

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFeedPath

func CreateFeedPath() string

CreateFeedPath computes a request path to the create action of feed.

func CreateFilterPath

func CreateFilterPath() string

CreateFilterPath computes a request path to the create action of filter.

func CreateOutputPath

func CreateOutputPath() string

CreateOutputPath computes a request path to the create action of output.

func DeleteFeedPath

func DeleteFeedPath(id string) string

DeleteFeedPath computes a request path to the delete action of feed.

func DeleteFilterPath

func DeleteFilterPath(id int) string

DeleteFilterPath computes a request path to the delete action of filter.

func DeleteOutputPath

func DeleteOutputPath(id int) string

DeleteOutputPath computes a request path to the delete action of output.

func GetFeedPath

func GetFeedPath(id string) string

GetFeedPath computes a request path to the get action of feed.

func GetFilterPath

func GetFilterPath(id int) string

GetFilterPath computes a request path to the get action of filter.

func GetHealthPath

func GetHealthPath() string

GetHealthPath computes a request path to the get action of health.

func GetIndexPath

func GetIndexPath() string

GetIndexPath computes a request path to the get action of index.

func GetOpmlPath

func GetOpmlPath() string

GetOpmlPath computes a request path to the get action of opml.

func GetOutputPath

func GetOutputPath(id int) string

GetOutputPath computes a request path to the get action of output.

func GetSwaggerPath

func GetSwaggerPath() string

GetSwaggerPath computes a request path to the get action of swagger.

func GetVarsPath

func GetVarsPath() string

GetVarsPath computes a request path to the get action of vars.

func ListFeedPath

func ListFeedPath() string

ListFeedPath computes a request path to the list action of feed.

func ListFilterPath

func ListFilterPath() string

ListFilterPath computes a request path to the list action of filter.

func ListOutputPath

func ListOutputPath() string

ListOutputPath computes a request path to the list action of output.

func PubPshbPath

func PubPshbPath() string

PubPshbPath computes a request path to the pub action of pshb.

func SpecsFilterPath

func SpecsFilterPath() string

SpecsFilterPath computes a request path to the specs action of filter.

func SpecsOutputPath

func SpecsOutputPath() string

SpecsOutputPath computes a request path to the specs action of output.

func StartFeedPath

func StartFeedPath(id string) string

StartFeedPath computes a request path to the start action of feed.

func StopFeedPath

func StopFeedPath(id string) string

StopFeedPath computes a request path to the stop action of feed.

func SubPshbPath

func SubPshbPath() string

SubPshbPath computes a request path to the sub action of pshb.

func UpdateFeedPath

func UpdateFeedPath(id string) string

UpdateFeedPath computes a request path to the update action of feed.

func UpdateFilterPath

func UpdateFilterPath(id int) string

UpdateFilterPath computes a request path to the update action of filter.

func UpdateOutputPath

func UpdateOutputPath(id int) string

UpdateOutputPath computes a request path to the update action of output.

func UploadOpmlPath

func UploadOpmlPath() string

UploadOpmlPath computes a request path to the upload action of opml.

Types

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the feedpushr service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) CreateFeed

func (c *Client) CreateFeed(ctx context.Context, path string, url_ string, tags *string, title *string) (*http.Response, error)

Create a new feed

func (*Client) CreateFilter

func (c *Client) CreateFilter(ctx context.Context, path string, payload *CreateFilterPayload, contentType string) (*http.Response, error)

Create a new filter

func (*Client) CreateOutput

func (c *Client) CreateOutput(ctx context.Context, path string, payload *CreateOutputPayload, contentType string) (*http.Response, error)

Create a new output

func (*Client) DecodeErrorResponse

func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)

DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.

func (*Client) DecodeFeed

func (c *Client) DecodeFeed(resp *http.Response) (*Feed, error)

DecodeFeed decodes the Feed instance encoded in resp body.

func (*Client) DecodeFeedCollection

func (c *Client) DecodeFeedCollection(resp *http.Response) (FeedCollection, error)

DecodeFeedCollection decodes the FeedCollection instance encoded in resp body.

func (c *Client) DecodeFeedLink(resp *http.Response) (*FeedLink, error)

DecodeFeedLink decodes the FeedLink instance encoded in resp body.

func (*Client) DecodeFeedLinkCollection

func (c *Client) DecodeFeedLinkCollection(resp *http.Response) (FeedLinkCollection, error)

DecodeFeedLinkCollection decodes the FeedLinkCollection instance encoded in resp body.

func (*Client) DecodeFeedTiny

func (c *Client) DecodeFeedTiny(resp *http.Response) (*FeedTiny, error)

DecodeFeedTiny decodes the FeedTiny instance encoded in resp body.

func (*Client) DecodeFeedTinyCollection

func (c *Client) DecodeFeedTinyCollection(resp *http.Response) (FeedTinyCollection, error)

DecodeFeedTinyCollection decodes the FeedTinyCollection instance encoded in resp body.

func (*Client) DecodeFeedsPage

func (c *Client) DecodeFeedsPage(resp *http.Response) (*FeedsPage, error)

DecodeFeedsPage decodes the FeedsPage instance encoded in resp body.

func (*Client) DecodeFilter

func (c *Client) DecodeFilter(resp *http.Response) (*Filter, error)

DecodeFilter decodes the Filter instance encoded in resp body.

func (*Client) DecodeFilterCollection

func (c *Client) DecodeFilterCollection(resp *http.Response) (FilterCollection, error)

DecodeFilterCollection decodes the FilterCollection instance encoded in resp body.

func (*Client) DecodeFilterSpec

func (c *Client) DecodeFilterSpec(resp *http.Response) (*FilterSpec, error)

DecodeFilterSpec decodes the FilterSpec instance encoded in resp body.

func (*Client) DecodeFilterSpecCollection

func (c *Client) DecodeFilterSpecCollection(resp *http.Response) (FilterSpecCollection, error)

DecodeFilterSpecCollection decodes the FilterSpecCollection instance encoded in resp body.

func (c *Client) DecodeHALLink(resp *http.Response) (*HALLink, error)

DecodeHALLink decodes the HALLink instance encoded in resp body.

func (*Client) DecodeInfo

func (c *Client) DecodeInfo(resp *http.Response) (*Info, error)

DecodeInfo decodes the Info instance encoded in resp body.

func (*Client) DecodeOutput

func (c *Client) DecodeOutput(resp *http.Response) (*Output, error)

DecodeOutput decodes the Output instance encoded in resp body.

func (*Client) DecodeOutputCollection

func (c *Client) DecodeOutputCollection(resp *http.Response) (OutputCollection, error)

DecodeOutputCollection decodes the OutputCollection instance encoded in resp body.

func (*Client) DecodeOutputSpec

func (c *Client) DecodeOutputSpec(resp *http.Response) (*OutputSpec, error)

DecodeOutputSpec decodes the OutputSpec instance encoded in resp body.

func (*Client) DecodeOutputSpecCollection

func (c *Client) DecodeOutputSpecCollection(resp *http.Response) (OutputSpecCollection, error)

DecodeOutputSpecCollection decodes the OutputSpecCollection instance encoded in resp body.

func (*Client) DecodePropSpec

func (c *Client) DecodePropSpec(resp *http.Response) (*PropSpec, error)

DecodePropSpec decodes the PropSpec instance encoded in resp body.

func (*Client) DecodePropSpecCollection

func (c *Client) DecodePropSpecCollection(resp *http.Response) (PropSpecCollection, error)

DecodePropSpecCollection decodes the PropSpecCollection instance encoded in resp body.

func (*Client) DeleteFeed

func (c *Client) DeleteFeed(ctx context.Context, path string) (*http.Response, error)

Delete a feed

func (*Client) DeleteFilter

func (c *Client) DeleteFilter(ctx context.Context, path string) (*http.Response, error)

Delete a filter

func (*Client) DeleteOutput

func (c *Client) DeleteOutput(ctx context.Context, path string) (*http.Response, error)

Delete an output

func (*Client) GetFeed

func (c *Client) GetFeed(ctx context.Context, path string) (*http.Response, error)

Retrieve feed with given ID

func (*Client) GetFilter

func (c *Client) GetFilter(ctx context.Context, path string) (*http.Response, error)

Retrieve filter with given ID

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context, path string) (*http.Response, error)

Perform health check.

func (*Client) GetIndex

func (c *Client) GetIndex(ctx context.Context, path string) (*http.Response, error)

Get basic API information.

func (*Client) GetOpml

func (c *Client) GetOpml(ctx context.Context, path string) (*http.Response, error)

Get all feeds as an OMPL format

func (*Client) GetOutput

func (c *Client) GetOutput(ctx context.Context, path string) (*http.Response, error)

Retrieve output with given ID

func (*Client) GetSwagger

func (c *Client) GetSwagger(ctx context.Context, path string) (*http.Response, error)

Get OpenAPI specifications

func (*Client) GetVars

func (c *Client) GetVars(ctx context.Context, path string) (*http.Response, error)

Get all internals exp vars

func (*Client) ListFeed

func (c *Client) ListFeed(ctx context.Context, path string, limit *int, page *int) (*http.Response, error)

Retrieve all feeds

func (*Client) ListFilter

func (c *Client) ListFilter(ctx context.Context, path string) (*http.Response, error)

Retrieve all filters definitions

func (*Client) ListOutput

func (c *Client) ListOutput(ctx context.Context, path string) (*http.Response, error)

Retrieve all outputs definitions

func (*Client) NewCreateFeedRequest

func (c *Client) NewCreateFeedRequest(ctx context.Context, path string, url_ string, tags *string, title *string) (*http.Request, error)

NewCreateFeedRequest create the request corresponding to the create action endpoint of the feed resource.

func (*Client) NewCreateFilterRequest

func (c *Client) NewCreateFilterRequest(ctx context.Context, path string, payload *CreateFilterPayload, contentType string) (*http.Request, error)

NewCreateFilterRequest create the request corresponding to the create action endpoint of the filter resource.

func (*Client) NewCreateOutputRequest

func (c *Client) NewCreateOutputRequest(ctx context.Context, path string, payload *CreateOutputPayload, contentType string) (*http.Request, error)

NewCreateOutputRequest create the request corresponding to the create action endpoint of the output resource.

func (*Client) NewDeleteFeedRequest

func (c *Client) NewDeleteFeedRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteFeedRequest create the request corresponding to the delete action endpoint of the feed resource.

func (*Client) NewDeleteFilterRequest

func (c *Client) NewDeleteFilterRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteFilterRequest create the request corresponding to the delete action endpoint of the filter resource.

func (*Client) NewDeleteOutputRequest

func (c *Client) NewDeleteOutputRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteOutputRequest create the request corresponding to the delete action endpoint of the output resource.

func (*Client) NewGetFeedRequest

func (c *Client) NewGetFeedRequest(ctx context.Context, path string) (*http.Request, error)

NewGetFeedRequest create the request corresponding to the get action endpoint of the feed resource.

func (*Client) NewGetFilterRequest

func (c *Client) NewGetFilterRequest(ctx context.Context, path string) (*http.Request, error)

NewGetFilterRequest create the request corresponding to the get action endpoint of the filter resource.

func (*Client) NewGetHealthRequest

func (c *Client) NewGetHealthRequest(ctx context.Context, path string) (*http.Request, error)

NewGetHealthRequest create the request corresponding to the get action endpoint of the health resource.

func (*Client) NewGetIndexRequest

func (c *Client) NewGetIndexRequest(ctx context.Context, path string) (*http.Request, error)

NewGetIndexRequest create the request corresponding to the get action endpoint of the index resource.

func (*Client) NewGetOpmlRequest

func (c *Client) NewGetOpmlRequest(ctx context.Context, path string) (*http.Request, error)

NewGetOpmlRequest create the request corresponding to the get action endpoint of the opml resource.

func (*Client) NewGetOutputRequest

func (c *Client) NewGetOutputRequest(ctx context.Context, path string) (*http.Request, error)

NewGetOutputRequest create the request corresponding to the get action endpoint of the output resource.

func (*Client) NewGetSwaggerRequest

func (c *Client) NewGetSwaggerRequest(ctx context.Context, path string) (*http.Request, error)

NewGetSwaggerRequest create the request corresponding to the get action endpoint of the swagger resource.

func (*Client) NewGetVarsRequest

func (c *Client) NewGetVarsRequest(ctx context.Context, path string) (*http.Request, error)

NewGetVarsRequest create the request corresponding to the get action endpoint of the vars resource.

func (*Client) NewListFeedRequest

func (c *Client) NewListFeedRequest(ctx context.Context, path string, limit *int, page *int) (*http.Request, error)

NewListFeedRequest create the request corresponding to the list action endpoint of the feed resource.

func (*Client) NewListFilterRequest

func (c *Client) NewListFilterRequest(ctx context.Context, path string) (*http.Request, error)

NewListFilterRequest create the request corresponding to the list action endpoint of the filter resource.

func (*Client) NewListOutputRequest

func (c *Client) NewListOutputRequest(ctx context.Context, path string) (*http.Request, error)

NewListOutputRequest create the request corresponding to the list action endpoint of the output resource.

func (*Client) NewPubPshbRequest

func (c *Client) NewPubPshbRequest(ctx context.Context, path string) (*http.Request, error)

NewPubPshbRequest create the request corresponding to the pub action endpoint of the pshb resource.

func (*Client) NewSpecsFilterRequest

func (c *Client) NewSpecsFilterRequest(ctx context.Context, path string) (*http.Request, error)

NewSpecsFilterRequest create the request corresponding to the specs action endpoint of the filter resource.

func (*Client) NewSpecsOutputRequest

func (c *Client) NewSpecsOutputRequest(ctx context.Context, path string) (*http.Request, error)

NewSpecsOutputRequest create the request corresponding to the specs action endpoint of the output resource.

func (*Client) NewStartFeedRequest

func (c *Client) NewStartFeedRequest(ctx context.Context, path string) (*http.Request, error)

NewStartFeedRequest create the request corresponding to the start action endpoint of the feed resource.

func (*Client) NewStopFeedRequest

func (c *Client) NewStopFeedRequest(ctx context.Context, path string) (*http.Request, error)

NewStopFeedRequest create the request corresponding to the stop action endpoint of the feed resource.

func (*Client) NewSubPshbRequest

func (c *Client) NewSubPshbRequest(ctx context.Context, path string, hubChallenge string, hubMode string, hubTopic string, hubLeaseSeconds *int) (*http.Request, error)

NewSubPshbRequest create the request corresponding to the sub action endpoint of the pshb resource.

func (*Client) NewUpdateFeedRequest

func (c *Client) NewUpdateFeedRequest(ctx context.Context, path string, tags *string, title *string) (*http.Request, error)

NewUpdateFeedRequest create the request corresponding to the update action endpoint of the feed resource.

func (*Client) NewUpdateFilterRequest

func (c *Client) NewUpdateFilterRequest(ctx context.Context, path string, payload *UpdateFilterPayload, contentType string) (*http.Request, error)

NewUpdateFilterRequest create the request corresponding to the update action endpoint of the filter resource.

func (*Client) NewUpdateOutputRequest

func (c *Client) NewUpdateOutputRequest(ctx context.Context, path string, payload *UpdateOutputPayload, contentType string) (*http.Request, error)

NewUpdateOutputRequest create the request corresponding to the update action endpoint of the output resource.

func (*Client) NewUploadOpmlRequest

func (c *Client) NewUploadOpmlRequest(ctx context.Context, path string) (*http.Request, error)

NewUploadOpmlRequest create the request corresponding to the upload action endpoint of the opml resource.

func (*Client) PubPshb

func (c *Client) PubPshb(ctx context.Context, path string) (*http.Response, error)

Publication endpoint for PSHB hubs

func (*Client) SpecsFilter

func (c *Client) SpecsFilter(ctx context.Context, path string) (*http.Response, error)

Retrieve all filter types available

func (*Client) SpecsOutput

func (c *Client) SpecsOutput(ctx context.Context, path string) (*http.Response, error)

Retrieve all output types available

func (*Client) StartFeed

func (c *Client) StartFeed(ctx context.Context, path string) (*http.Response, error)

Start feed aggregation

func (*Client) StopFeed

func (c *Client) StopFeed(ctx context.Context, path string) (*http.Response, error)

Stop feed aggregation

func (*Client) SubPshb

func (c *Client) SubPshb(ctx context.Context, path string, hubChallenge string, hubMode string, hubTopic string, hubLeaseSeconds *int) (*http.Response, error)

Callback to validate the (un)subscription to the topic of a Hub

func (*Client) UpdateFeed

func (c *Client) UpdateFeed(ctx context.Context, path string, tags *string, title *string) (*http.Response, error)

Update a feed

func (*Client) UpdateFilter

func (c *Client) UpdateFilter(ctx context.Context, path string, payload *UpdateFilterPayload, contentType string) (*http.Response, error)

Update a filter

func (*Client) UpdateOutput

func (c *Client) UpdateOutput(ctx context.Context, path string, payload *UpdateOutputPayload, contentType string) (*http.Response, error)

Update an output

func (*Client) UploadOpml

func (c *Client) UploadOpml(ctx context.Context, path string) (*http.Response, error)

Upload an OPML file to create feeds

type CreateFilterPayload

type CreateFilterPayload struct {
	// Alias of the filter
	Alias string `form:"alias" json:"alias" yaml:"alias" xml:"alias"`
	// Conditional expression of the output
	Condition string `form:"condition" json:"condition" yaml:"condition" xml:"condition"`
	// Name of the filter
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Filter properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

CreateFilterPayload is the filter create action payload.

type CreateOutputPayload

type CreateOutputPayload struct {
	// Alias of the output
	Alias string `form:"alias" json:"alias" yaml:"alias" xml:"alias"`
	// Conditional expression of the output
	Condition string `form:"condition" json:"condition" yaml:"condition" xml:"condition"`
	// Name of the output
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Output properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

CreateOutputPayload is the output create action payload.

type Feed

type Feed struct {
	// Date of creation
	Cdate time.Time `form:"cdate" json:"cdate" yaml:"cdate" xml:"cdate"`
	// Number of consecutive aggregation errors
	ErrorCount *int `form:"errorCount,omitempty" json:"errorCount,omitempty" yaml:"errorCount,omitempty" xml:"errorCount,omitempty"`
	// Last aggregation error
	ErrorMsg *string `form:"errorMsg,omitempty" json:"errorMsg,omitempty" yaml:"errorMsg,omitempty" xml:"errorMsg,omitempty"`
	// URL of the feed website
	HTMLURL *string `form:"htmlUrl,omitempty" json:"htmlUrl,omitempty" yaml:"htmlUrl,omitempty" xml:"htmlUrl,omitempty"`
	// URL of the PubSubHubbud hub
	HubURL *string `form:"hubUrl,omitempty" json:"hubUrl,omitempty" yaml:"hubUrl,omitempty" xml:"hubUrl,omitempty"`
	// ID of feed (MD5 of the xmlUrl)
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// Last aggregation pass
	LastCheck *time.Time `form:"lastCheck,omitempty" json:"lastCheck,omitempty" yaml:"lastCheck,omitempty" xml:"lastCheck,omitempty"`
	// Date of modification
	Mdate time.Time `form:"mdate" json:"mdate" yaml:"mdate" xml:"mdate"`
	// Total number of processed items
	NbProcessedItems *int `` /* 134-byte string literal not displayed */
	// Next aggregation pass
	NextCheck *time.Time `form:"nextCheck,omitempty" json:"nextCheck,omitempty" yaml:"nextCheck,omitempty" xml:"nextCheck,omitempty"`
	// Aggregation status
	Status *string `form:"status,omitempty" json:"status,omitempty" yaml:"status,omitempty" xml:"status,omitempty"`
	// List of tags
	Tags []string `form:"tags,omitempty" json:"tags,omitempty" yaml:"tags,omitempty" xml:"tags,omitempty"`
	// Text attribute of the Feed
	Text *string `form:"text,omitempty" json:"text,omitempty" yaml:"text,omitempty" xml:"text,omitempty"`
	// Title of the Feed
	Title string `form:"title" json:"title" yaml:"title" xml:"title"`
	// URL of the XML feed
	XMLURL string `form:"xmlUrl" json:"xmlUrl" yaml:"xmlUrl" xml:"xmlUrl"`
}

A RSS feed (default view)

Identifier: application/vnd.feedpushr.feed.v1+json; view=default

func (*Feed) Validate

func (mt *Feed) Validate() (err error)

Validate validates the Feed media type instance.

type FeedCollection

type FeedCollection []*Feed

FeedCollection is the media type for an array of Feed (default view)

Identifier: application/vnd.feedpushr.feed.v1+json; type=collection; view=default

func (FeedCollection) Validate

func (mt FeedCollection) Validate() (err error)

Validate validates the FeedCollection media type instance.

type FeedLink struct {
	// ID of feed (MD5 of the xmlUrl)
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// URL of the XML feed
	XMLURL string `form:"xmlUrl" json:"xmlUrl" yaml:"xmlUrl" xml:"xmlUrl"`
}

A RSS feed (link view)

Identifier: application/vnd.feedpushr.feed.v1+json; view=link

func (*FeedLink) Validate

func (mt *FeedLink) Validate() (err error)

Validate validates the FeedLink media type instance.

type FeedLinkCollection

type FeedLinkCollection []*FeedLink

FeedCollection is the media type for an array of Feed (link view)

Identifier: application/vnd.feedpushr.feed.v1+json; type=collection; view=link

func (FeedLinkCollection) Validate

func (mt FeedLinkCollection) Validate() (err error)

Validate validates the FeedLinkCollection media type instance.

type FeedTiny

type FeedTiny struct {
	// Date of creation
	Cdate time.Time `form:"cdate" json:"cdate" yaml:"cdate" xml:"cdate"`
	// ID of feed (MD5 of the xmlUrl)
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// List of tags
	Tags []string `form:"tags,omitempty" json:"tags,omitempty" yaml:"tags,omitempty" xml:"tags,omitempty"`
	// Title of the Feed
	Title string `form:"title" json:"title" yaml:"title" xml:"title"`
	// URL of the XML feed
	XMLURL string `form:"xmlUrl" json:"xmlUrl" yaml:"xmlUrl" xml:"xmlUrl"`
}

A RSS feed (tiny view)

Identifier: application/vnd.feedpushr.feed.v1+json; view=tiny

func (*FeedTiny) Validate

func (mt *FeedTiny) Validate() (err error)

Validate validates the FeedTiny media type instance.

type FeedTinyCollection

type FeedTinyCollection []*FeedTiny

FeedCollection is the media type for an array of Feed (tiny view)

Identifier: application/vnd.feedpushr.feed.v1+json; type=collection; view=tiny

func (FeedTinyCollection) Validate

func (mt FeedTinyCollection) Validate() (err error)

Validate validates the FeedTinyCollection media type instance.

type FeedsPage

type FeedsPage struct {
	// Current page number
	Current int `form:"current" json:"current" yaml:"current" xml:"current"`
	// List of feeds
	Data FeedCollection `form:"data" json:"data" yaml:"data" xml:"data"`
	// Max number of feeds by page
	Limit int `form:"limit" json:"limit" yaml:"limit" xml:"limit"`
	// Total number of feeds
	Total int `form:"total" json:"total" yaml:"total" xml:"total"`
}

A pagignated list of feeds (default view)

Identifier: application/vnd.feedpushr.feeds-page.v1+json; view=default

func (*FeedsPage) Validate

func (mt *FeedsPage) Validate() (err error)

Validate validates the FeedsPage media type instance.

type Filter

type Filter struct {
	// Alias of the filter
	Alias string `form:"alias" json:"alias" yaml:"alias" xml:"alias"`
	// Conditional expression of the filter
	Condition string `form:"condition" json:"condition" yaml:"condition" xml:"condition"`
	// Description of the filter
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Status
	Enabled bool `form:"enabled" json:"enabled" yaml:"enabled" xml:"enabled"`
	// ID of the filter
	ID int `form:"id" json:"id" yaml:"id" xml:"id"`
	// Name of the filter
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Filter properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

A filter (default view)

Identifier: application/vnd.feedpushr.filter.v1+json; view=default

func (*Filter) Validate

func (mt *Filter) Validate() (err error)

Validate validates the Filter media type instance.

type FilterCollection

type FilterCollection []*Filter

FilterCollection is the media type for an array of Filter (default view)

Identifier: application/vnd.feedpushr.filter.v1+json; type=collection; view=default

func (FilterCollection) Validate

func (mt FilterCollection) Validate() (err error)

Validate validates the FilterCollection media type instance.

type FilterSpec

type FilterSpec struct {
	// Description of the filter
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Name of the filter
	Name  string             `form:"name" json:"name" yaml:"name" xml:"name"`
	Props PropSpecCollection `form:"props" json:"props" yaml:"props" xml:"props"`
}

The filter specification (default view)

Identifier: application/vnd.feedpushr.filter-spec.v1+json; view=default

func (*FilterSpec) Validate

func (mt *FilterSpec) Validate() (err error)

Validate validates the FilterSpec media type instance.

type FilterSpecCollection

type FilterSpecCollection []*FilterSpec

FilterSpecCollection is the media type for an array of FilterSpec (default view)

Identifier: application/vnd.feedpushr.filter-spec.v1+json; type=collection; view=default

func (FilterSpecCollection) Validate

func (mt FilterSpecCollection) Validate() (err error)

Validate validates the FilterSpecCollection media type instance.

type HALLink struct {
	// Link's destination
	Href string `form:"href" json:"href" yaml:"href" xml:"href"`
}

HAL link (default view)

Identifier: application/vnd.feedpushr.hal-links.v1+json; view=default

func (*HALLink) Validate

func (mt *HALLink) Validate() (err error)

Validate validates the HALLink media type instance.

type Info

type Info struct {
	// HAL links
	Links map[string]*HALLink `form:"_links" json:"_links" yaml:"_links" xml:"_links"`
	// Service description
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Service name
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Service version
	Version string `form:"version" json:"version" yaml:"version" xml:"version"`
}

API info (default view)

Identifier: application/vnd.feedpushr.info.v1+json; view=default

func (*Info) Validate

func (mt *Info) Validate() (err error)

Validate validates the Info media type instance.

type Output

type Output struct {
	// Alias of the output channel
	Alias string `form:"alias" json:"alias" yaml:"alias" xml:"alias"`
	// Conditional expression of the filter
	Condition string `form:"condition" json:"condition" yaml:"condition" xml:"condition"`
	// Description of the output channel
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Status
	Enabled bool `form:"enabled" json:"enabled" yaml:"enabled" xml:"enabled"`
	// ID of the output
	ID int `form:"id" json:"id" yaml:"id" xml:"id"`
	// Name of the output channel
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Output channel properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

The output channel (default view)

Identifier: application/vnd.feedpushr.output.v1+json; view=default

func (*Output) Validate

func (mt *Output) Validate() (err error)

Validate validates the Output media type instance.

type OutputCollection

type OutputCollection []*Output

OutputCollection is the media type for an array of Output (default view)

Identifier: application/vnd.feedpushr.output.v1+json; type=collection; view=default

func (OutputCollection) Validate

func (mt OutputCollection) Validate() (err error)

Validate validates the OutputCollection media type instance.

type OutputSpec

type OutputSpec struct {
	// Description of the output channel
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Name of the output channel
	Name  string             `form:"name" json:"name" yaml:"name" xml:"name"`
	Props PropSpecCollection `form:"props" json:"props" yaml:"props" xml:"props"`
}

The output channel specification (default view)

Identifier: application/vnd.feedpushr.output-spec.v1+json; view=default

func (*OutputSpec) Validate

func (mt *OutputSpec) Validate() (err error)

Validate validates the OutputSpec media type instance.

type OutputSpecCollection

type OutputSpecCollection []*OutputSpec

OutputSpecCollection is the media type for an array of OutputSpec (default view)

Identifier: application/vnd.feedpushr.output-spec.v1+json; type=collection; view=default

func (OutputSpecCollection) Validate

func (mt OutputSpecCollection) Validate() (err error)

Validate validates the OutputSpecCollection media type instance.

type PropSpec

type PropSpec struct {
	// Description of the output channel
	Desc string `form:"desc" json:"desc" yaml:"desc" xml:"desc"`
	// Name of the property
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// Property options
	Options map[string]string `form:"options,omitempty" json:"options,omitempty" yaml:"options,omitempty" xml:"options,omitempty"`
	// Property type ('text', 'url', ...)
	Type string `form:"type" json:"type" yaml:"type" xml:"type"`
}

The specification of a property (default view)

Identifier: application/vnd.feedpushr.prop-spec.v1+json; view=default

func (*PropSpec) Validate

func (mt *PropSpec) Validate() (err error)

Validate validates the PropSpec media type instance.

type PropSpecCollection

type PropSpecCollection []*PropSpec

PropSpecCollection is the media type for an array of PropSpec (default view)

Identifier: application/vnd.feedpushr.prop-spec.v1+json; type=collection; view=default

func (PropSpecCollection) Validate

func (mt PropSpecCollection) Validate() (err error)

Validate validates the PropSpecCollection media type instance.

type SubscriptionPayload

type SubscriptionPayload struct {
	Alias *string `form:"alias,omitempty" json:"alias,omitempty" yaml:"alias,omitempty" xml:"alias,omitempty"`
	URI   *string `form:"uri,omitempty" json:"uri,omitempty" yaml:"uri,omitempty" xml:"uri,omitempty"`
}

SubscriptionPayload user type.

func (*SubscriptionPayload) Validate

func (ut *SubscriptionPayload) Validate() (err error)

Validate validates the SubscriptionPayload type instance.

type UpdateFilterPayload

type UpdateFilterPayload struct {
	// Alias of the filter
	Alias *string `form:"alias,omitempty" json:"alias,omitempty" yaml:"alias,omitempty" xml:"alias,omitempty"`
	// Conditional expression of the output
	Condition *string `form:"condition,omitempty" json:"condition,omitempty" yaml:"condition,omitempty" xml:"condition,omitempty"`
	// Filter status
	Enabled bool `form:"enabled" json:"enabled" yaml:"enabled" xml:"enabled"`
	// Filter properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

UpdateFilterPayload is the filter update action payload.

type UpdateOutputPayload

type UpdateOutputPayload struct {
	// Alias of the output
	Alias *string `form:"alias,omitempty" json:"alias,omitempty" yaml:"alias,omitempty" xml:"alias,omitempty"`
	// Conditional expression of the output
	Condition *string `form:"condition,omitempty" json:"condition,omitempty" yaml:"condition,omitempty" xml:"condition,omitempty"`
	// Output status
	Enabled bool `form:"enabled" json:"enabled" yaml:"enabled" xml:"enabled"`
	// Output properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
}

UpdateOutputPayload is the output update action payload.

Jump to

Keyboard shortcuts

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