access

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	TwitchClient       string
	TwitchClientSecret string

	FallbackToken string

	TokenUpdateHook func()
}

type Service

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

func New

func New(db database.Connector) (*Service, error)

func (Service) GetBotTwitchClient

func (s Service) GetBotTwitchClient(cfg ClientConfig) (*twitch.Client, error)

func (Service) GetTwitchClientForChannel

func (s Service) GetTwitchClientForChannel(channel string, cfg ClientConfig) (*twitch.Client, error)

func (Service) HasAnyPermissionForChannel

func (s Service) HasAnyPermissionForChannel(channel string, scopes ...string) (bool, error)

func (Service) HasPermissionsForChannel

func (s Service) HasPermissionsForChannel(channel string, scopes ...string) (bool, error)

func (Service) RemoveExendedTwitchCredentials

func (s Service) RemoveExendedTwitchCredentials(channel string) error

func (Service) SetBotTwitchCredentials

func (s Service) SetBotTwitchCredentials(accessToken, refreshToken string) (err error)

func (Service) SetExtendedTwitchCredentials

func (s Service) SetExtendedTwitchCredentials(channel, accessToken, refreshToken string, scope []string) (err error)

Jump to

Keyboard shortcuts

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