gif

package
v0.179.11 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is class with methods available over RPC.

func NewGifAPI

func NewGifAPI(db *accounts.Database) *API

func (*API) FetchGifs

func (api *API) FetchGifs(path string) (value string, err error)

func (*API) GetContentWithRetry

func (api *API) GetContentWithRetry(path string) (value string, err error)

func (*API) GetFavoriteGifs

func (api *API) GetFavoriteGifs() (favoriteGifs []Gif, err error)

func (*API) GetRecentGifs

func (api *API) GetRecentGifs() (recentGifs []Gif, err error)

func (*API) SetTenorAPIKey

func (api *API) SetTenorAPIKey(key string) (err error)

func (*API) UpdateFavoriteGifs

func (api *API) UpdateFavoriteGifs(updatedGifs json.RawMessage) (err error)

func (*API) UpdateRecentGifs

func (api *API) UpdateRecentGifs(updatedGifs json.RawMessage) (err error)

type Container

type Container struct {
	Items []Gif `json:"items"`
}

type Gif

type Gif struct {
	ID         string `json:"id"`
	Title      string `json:"title"`
	URL        string `json:"url"`
	TinyURL    string `json:"tinyUrl"`
	Height     int    `json:"height"`
	IsFavorite bool   `json:"isFavorite"`
}

type Service

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

Service represents out own implementation of personal sign operations.

func NewService

func NewService(db *accounts.Database) *Service

New returns a new Service.

func (*Service) APIs

func (s *Service) APIs() []rpc.API

APIs returns a list of new APIs.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns a new protocols list. In this case, there are none.

func (*Service) Start

func (s *Service) Start() error

Start is run when a service is started.

func (*Service) Stop

func (s *Service) Stop() error

Stop is run when a service is stopped.

Jump to

Keyboard shortcuts

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