storage

package
v0.0.0-...-ca55dfe Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FILENAME = "./secret.json"

Variables

This section is empty.

Functions

func CreateOrWriteTokenFile

func CreateOrWriteTokenFile() (*os.File, error)

func GetConnection

func GetConnection() *sql.Conn

func GetSecretFile

func GetSecretFile() (*os.File, error)

func GetSecretFilePath

func GetSecretFilePath() string

func GetToken

func GetToken() (*oauth2.Token, error)

func GetTokenFilePath

func GetTokenFilePath() string

func Migrate

func Migrate()

func ReadTokenFile

func ReadTokenFile() (*os.File, error)

func SaveToken

func SaveToken(token string) error

Types

type FavoriteSheet

type FavoriteSheet struct {
	Name string
	ID   string
}

type Storage

type Storage struct {
	Conn *sql.Conn
}

func GetStorage

func GetStorage() Storage

func (*Storage) Get

func (s *Storage) Get(name string) (string, error)

func (*Storage) GetDelimiter

func (s *Storage) GetDelimiter() string

func (*Storage) GetProp

func (s *Storage) GetProp(prop string) (string, error)

func (*Storage) GetSelectedFavorite

func (s *Storage) GetSelectedFavorite() string

func (*Storage) ListAll

func (s *Storage) ListAll() []FavoriteSheet

func (*Storage) Remove

func (s *Storage) Remove(id string) error

func (*Storage) SetDelimiter

func (s *Storage) SetDelimiter(delimiter string)

func (*Storage) SetProp

func (s *Storage) SetProp(prop string, value string) error

func (*Storage) SetSelectedFavorite

func (s *Storage) SetSelectedFavorite(name string)

func (*Storage) Store

func (s *Storage) Store(sheet FavoriteSheet)

Jump to

Keyboard shortcuts

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