kvstore

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

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

func (Impl) DeleteGoogleUserToken

func (kv Impl) DeleteGoogleUserToken(userID string) error

func (Impl) DeleteOAuthStateToken

func (kv Impl) DeleteOAuthStateToken(key string) error

func (Impl) DeleteWatchChannelData

func (kv Impl) DeleteWatchChannelData(userID string) error

func (Impl) GetGoogleUserToken

func (kv Impl) GetGoogleUserToken(userID string) ([]byte, error)

func (Impl) GetLastActivityForFile

func (kv Impl) GetLastActivityForFile(userID, fileID string) (string, error)

func (Impl) GetOAuthStateToken

func (kv Impl) GetOAuthStateToken(key string) ([]byte, error)

func (Impl) GetProjectRateLimitExceeded

func (kv Impl) GetProjectRateLimitExceeded(serviceType string) (bool, error)

func (Impl) GetUserRateLimitExceeded

func (kv Impl) GetUserRateLimitExceeded(serviceType string, userID string) (bool, error)

func (Impl) GetWatchChannelData

func (kv Impl) GetWatchChannelData(userID string) (*model.WatchChannelData, error)

func (Impl) GetWatchChannelDataUsingKey

func (kv Impl) GetWatchChannelDataUsingKey(key string) (*model.WatchChannelData, error)

func (Impl) ListWatchChannelDataKeys

func (kv Impl) ListWatchChannelDataKeys(page, perPage int) ([]string, error)

func (Impl) StoreGoogleUserToken

func (kv Impl) StoreGoogleUserToken(userID string, encryptedToken []byte) error

func (Impl) StoreLastActivityForFile

func (kv Impl) StoreLastActivityForFile(userID, fileID, activityTime string) error

func (Impl) StoreOAuthStateToken

func (kv Impl) StoreOAuthStateToken(key, value string) error

func (Impl) StoreProjectRateLimitExceeded

func (kv Impl) StoreProjectRateLimitExceeded(serviceType string) error

func (Impl) StoreUserRateLimitExceeded

func (kv Impl) StoreUserRateLimitExceeded(serviceType string, userID string) error

func (Impl) StoreWatchChannelData

func (kv Impl) StoreWatchChannelData(userID string, watchChannelData model.WatchChannelData) error

type KVStore

type KVStore interface {
	StoreWatchChannelData(userID string, watchChannelData model.WatchChannelData) error
	GetWatchChannelData(userID string) (*model.WatchChannelData, error)
	GetWatchChannelDataUsingKey(key string) (*model.WatchChannelData, error)
	ListWatchChannelDataKeys(page, perPage int) ([]string, error)
	DeleteWatchChannelData(userID string) error

	StoreLastActivityForFile(userID, fileID, activityTime string) error
	GetLastActivityForFile(userID, fileID string) (string, error)

	StoreOAuthStateToken(key, value string) error
	GetOAuthStateToken(key string) ([]byte, error)
	DeleteOAuthStateToken(key string) error

	StoreGoogleUserToken(userID string, encryptedToken []byte) error
	GetGoogleUserToken(userID string) ([]byte, error)
	DeleteGoogleUserToken(userID string) error

	StoreUserRateLimitExceeded(serviceType string, userID string) error
	GetUserRateLimitExceeded(serviceType string, userID string) (bool, error)

	StoreProjectRateLimitExceeded(serviceType string) error
	GetProjectRateLimitExceeded(serviceType string) (bool, error)
}

func NewKVStore

func NewKVStore(client *pluginapi.Client) KVStore

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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