client

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 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" grimoire:"index"`
	URL         string    `bson:"url" json:"url"`
	Scraper     string    `bson:"scraper" json:"scraper" grimoire:"index"`
	Downloader  string    `bson:"downloader" json:"downloader" grimoire:"index"`
	Enabled     bool      `bson:"enabled" json:"enabled"`
	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 PageRefreshRequest added in v0.3.4

type PageRefreshRequest struct {
	ID string `json:"id"`
}

type PageRefreshResponse added in v0.3.4

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

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) Refresh added in v0.3.4

func (*PageService) Settings

func (*PageService) Show

func (*PageService) Update

func (*PageService) Videos added in v0.3.3

func (*PageService) Visits added in v0.3.4

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 PageVisitsRequest added in v0.3.4

type PageVisitsRequest struct {
	ID    string `json:"id"`
	Page  int    `json:"page"`
	Limit int    `json:"limit"`
}

type PageVisitsResponse added in v0.3.4

type PageVisitsResponse struct {
	*Response
	Result []*Visit `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 SettingsBatch added in v0.3.4

type SettingsBatch struct {
	IDs   []string `json:"ids"`
	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"`
	PageID     primitive.ObjectID `bson:"page_id" json:"page_id" grimoire:"index"`
	Title      string             `bson:"title" json:"title" grimoire:"index"`
	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" grimoire:"index"`
}

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" grimoire:"index"`
	URL        string             `bson:"url" json:"url"`
	Error      string             `bson:"error" json:"error"`
	Stacktrace []string           `bson:"stacktrace" json:"stacktrace"`
}

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