client

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// RemoteHost is the URL of the remote server that this Client should
	// access.
	RemoteHost string
	// Debug enables debug on Resty client
	Debug bool
	// Resty
	Resty *resty.Client

	// Services corresponding to the different endpoints (groups/routes)
	Page  *PageService
	Video *VideoService
	Visit *VisitService
}

Client is used to access Pace services.

func New

func New(remoteHost string) *Client

New makes a new Client.

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

Set the debug flag

type Page

type Page struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name        string    `bson:"name" json:"name"`
	Url         string    `bson:"url" json:"url"`
	Scraper     string    `bson:"scraper" json:"scraper"`
	Downloader  string    `bson:"downloader" json:"downloader"`
	ProcessedAt time.Time `bson:"processed_at" json:"processed_at"`
}

type PageCreateRequest

type PageCreateRequest struct {
	Subject *Page `json:"subject"`
}

type PageCreateResponse

type PageCreateResponse struct {
	*Response
	Result *Page `json:"result"`
}

type PageDeleteRequest

type PageDeleteRequest struct {
	Id string `json:"id"`
}

type PageDeleteResponse

type PageDeleteResponse struct {
	*Response
	Result *Page `json:"result"`
}

type PageIndexRequest

type PageIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type PageIndexResponse

type PageIndexResponse struct {
	*Response
	Result []*Page `json:"result"`
	Total  int64   `json:"total"`
}

type PageService

type PageService struct {
	// contains filtered or unexported fields
}

func NewPageService

func NewPageService(client *Client) *PageService

NewPage makes a new client for accessing Page services.

func (*PageService) Create

func (*PageService) Delete

func (*PageService) Index

func (*PageService) Settings

func (*PageService) Show

func (*PageService) Update

func (*PageService) Videos added in v0.3.3

type PageSettingsRequest

type PageSettingsRequest struct {
	Id      string   `json:"id"`
	Setting *Setting `json:"setting"`
}

type PageSettingsResponse

type PageSettingsResponse struct {
	*Response
	Result *Page `json:"result"`
}

type PageShowRequest

type PageShowRequest struct {
	Id string `json:"id"`
}

type PageShowResponse

type PageShowResponse struct {
	*Response
	Result *Page `json:"result"`
}

type PageUpdateRequest

type PageUpdateRequest struct {
	Id      string `json:"id"`
	Subject *Page  `json:"subject"`
}

type PageUpdateResponse

type PageUpdateResponse struct {
	*Response
	Result *Page `json:"result"`
}

type PageVideosRequest added in v0.3.3

type PageVideosRequest struct {
	Id    string `json:"id"`
	Page  int    `json:"page"`
	Limit int    `json:"limit"`
}

type PageVideosResponse added in v0.3.3

type PageVideosResponse struct {
	*Response
	Result []*Video `json:"result"`
}

type Response

type Response struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
}

type Setting

type Setting struct {
	Name  string `json:"name"`
	Value bool   `json:"value"`
}

type Video

type Video struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Title      string `bson:"title" json:"title"`
	Season     int    `bson:"season" json:"season"`
	Episode    int    `bson:"episode" json:"episode"`
	Raw        string `bson:"raw" json:"raw"`
	DisplayId  string `bson:"display_id" json:"display_id"`
	Extension  string `bson:"extension" json:"extension"`
	Resolution int    `bson:"resolution" json:"resolution"`
	Size       int64  `bson:"size" json:"size"`
	Download   string `bson:"download" json:"download"`
	View       string `bson:"view" json:"view"`
	Source     string `bson:"source" json:"source"`
}

type VideoCreateRequest

type VideoCreateRequest struct {
	Subject *Video `json:"subject"`
}

type VideoCreateResponse

type VideoCreateResponse struct {
	*Response
	Result *Video `json:"result"`
}

type VideoDeleteRequest

type VideoDeleteRequest struct {
	Id string `json:"id"`
}

type VideoDeleteResponse

type VideoDeleteResponse struct {
	*Response
	Result *Video `json:"result"`
}

type VideoIndexRequest

type VideoIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type VideoIndexResponse

type VideoIndexResponse struct {
	*Response
	Result []*Video `json:"result"`
	Total  int64    `json:"total"`
}

type VideoService

type VideoService struct {
	// contains filtered or unexported fields
}

func NewVideoService

func NewVideoService(client *Client) *VideoService

NewVideo makes a new client for accessing Video services.

func (*VideoService) Create

func (*VideoService) Delete

func (*VideoService) Index

func (*VideoService) Settings

func (*VideoService) Show

func (*VideoService) Update

type VideoSettingsRequest

type VideoSettingsRequest struct {
	Id      string   `json:"id"`
	Setting *Setting `json:"setting"`
}

type VideoSettingsResponse

type VideoSettingsResponse struct {
	*Response
	Result *Video `json:"result"`
}

type VideoShowRequest

type VideoShowRequest struct {
	Id string `json:"id"`
}

type VideoShowResponse

type VideoShowResponse struct {
	*Response
	Result *Video `json:"result"`
}

type VideoUpdateRequest

type VideoUpdateRequest struct {
	Id      string `json:"id"`
	Subject *Video `json:"subject"`
}

type VideoUpdateResponse

type VideoUpdateResponse struct {
	*Response
	Result *Video `json:"result"`
}

type Visit

type Visit struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	PageId primitive.ObjectID `bson:"page_id" json:"page_id"`
	Url    string             `bson:"url" json:"url"`
}

type VisitCreateRequest

type VisitCreateRequest struct {
	Subject *Visit `json:"subject"`
}

type VisitCreateResponse

type VisitCreateResponse struct {
	*Response
	Result *Visit `json:"result"`
}

type VisitDeleteRequest

type VisitDeleteRequest struct {
	Id string `json:"id"`
}

type VisitDeleteResponse

type VisitDeleteResponse struct {
	*Response
	Result *Visit `json:"result"`
}

type VisitIndexRequest

type VisitIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type VisitIndexResponse

type VisitIndexResponse struct {
	*Response
	Result []*Visit `json:"result"`
	Total  int64    `json:"total"`
}

type VisitService

type VisitService struct {
	// contains filtered or unexported fields
}

func NewVisitService

func NewVisitService(client *Client) *VisitService

NewVisit makes a new client for accessing Visit services.

func (*VisitService) Create

func (*VisitService) Delete

func (*VisitService) Index

func (*VisitService) Settings

func (*VisitService) Show

func (*VisitService) Update

type VisitSettingsRequest

type VisitSettingsRequest struct {
	Id      string   `json:"id"`
	Setting *Setting `json:"setting"`
}

type VisitSettingsResponse

type VisitSettingsResponse struct {
	*Response
	Result *Visit `json:"result"`
}

type VisitShowRequest

type VisitShowRequest struct {
	Id string `json:"id"`
}

type VisitShowResponse

type VisitShowResponse struct {
	*Response
	Result *Visit `json:"result"`
}

type VisitUpdateRequest

type VisitUpdateRequest struct {
	Id      string `json:"id"`
	Subject *Visit `json:"subject"`
}

type VisitUpdateResponse

type VisitUpdateResponse struct {
	*Response
	Result *Visit `json:"result"`
}

Jump to

Keyboard shortcuts

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