client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 9 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 DeleteFeedPath

func DeleteFeedPath(id string) string

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

func GetFeedPath

func GetFeedPath(id string) string

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

func GetHealthPath

func GetHealthPath() string

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

func GetOpmlPath

func GetOpmlPath() string

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

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 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 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) 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) 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) 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) 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) DeleteFeed

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

Delete a feed

func (*Client) GetFeed

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

Retrieve feed with given id

func (*Client) GetHealth

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

Perform health check.

func (*Client) GetOpml

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

Get all feeds as an OMPL format

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) 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) 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) 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) 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) 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) 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) 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) 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) UploadOpml

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

Upload an OPML file to create feeds

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 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 Filter

type Filter 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"`
	// Filter properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
	// List of tags
	Tags []string `form:"tags,omitempty" json:"tags,omitempty" yaml:"tags,omitempty" xml:"tags,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 Output

type Output 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"`
	// Output channel properties
	Props map[string]interface{} `form:"props,omitempty" json:"props,omitempty" yaml:"props,omitempty" xml:"props,omitempty"`
	// List of tags
	Tags []string `form:"tags,omitempty" json:"tags,omitempty" yaml:"tags,omitempty" xml:"tags,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 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.

Jump to

Keyboard shortcuts

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