cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetUsers(users *helix.UsersParams) (*UsersResult, error)
	GetGames(games *helix.GamesParams) (*GamesResult, error)
	GetUsersAndGames(users *helix.UsersParams, games *helix.GamesParams) (*UsersResult, *GamesResult, error)
	GetStreams(streams *helix.StreamsParams) ([]helix.Stream, error)
	SearchChannels(search *helix.SearchChannelsParams) ([]helix.Channel, error)
}

type ClientOptions

type ClientOptions struct {
	ClientID        string
	ClientSecret    string
	Expiration      time.Duration
	CleanupInterval time.Duration
}

type GamesResult

type GamesResult struct {
	Games []helix.Game
}

func (*GamesResult) ID

func (g *GamesResult) ID(id string) *helix.Game

func (*GamesResult) Name

func (g *GamesResult) Name(name string) *helix.Game

type HelixCacheClient

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

func NewHelixCacheClient

func NewHelixCacheClient(options *ClientOptions) *HelixCacheClient

func (*HelixCacheClient) CacheSize

func (c *HelixCacheClient) CacheSize() uint32

func (*HelixCacheClient) GetAppTokenClient

func (c *HelixCacheClient) GetAppTokenClient() (*helix.Client, error)

func (*HelixCacheClient) GetGames

func (c *HelixCacheClient) GetGames(games *helix.GamesParams) (*GamesResult, error)

func (*HelixCacheClient) GetStreams

func (c *HelixCacheClient) GetStreams(streams *helix.StreamsParams) ([]helix.Stream, error)

func (*HelixCacheClient) GetUsers

func (c *HelixCacheClient) GetUsers(users *helix.UsersParams) (*UsersResult, error)

func (*HelixCacheClient) GetUsersAndGames

func (c *HelixCacheClient) GetUsersAndGames(users *helix.UsersParams, games *helix.GamesParams) (*UsersResult, *GamesResult, error)

Utility function

func (*HelixCacheClient) SearchChannels

func (c *HelixCacheClient) SearchChannels(search *helix.SearchChannelsParams) ([]helix.Channel, error)

type UsersResult

type UsersResult struct {
	Users []helix.User
}

func (*UsersResult) ID

func (u *UsersResult) ID(id string) *helix.User

func (*UsersResult) Name

func (u *UsersResult) Name(name string) *helix.User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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