{"modulePath":"github.com/proshik/githubstatbot","version":"v0.0.0-20210927221415-fc364c1ba5fd","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package storage\n\n## Constants\n\n```go\nconst TABLE_USERS = `create table if not exists users\n(\n  id           serial,\n  created_date timestamp default now(),\n  chat_id      bigint unique     not null,\n  access_token text unique     \t not null\n);`\n```\n\n## Types\n\n```go\ntype AccessTokenStorage interface {\n\tGet(chatId int64) (string, error)\n\tAdd(chatId int64, accessToken string) error\n\tDelete(key int64) error\n}\n```\n\n```go\ntype Postgres struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPostgres(url string) *Postgres\n```\n\n```go\nfunc (postgres *Postgres) Add(chatId int64, accessToken string) error\n```\n\n```go\nfunc (postgres *Postgres) Delete(chatId int64) error\n```\n\n```go\nfunc (postgres *Postgres) Get(chatId int64) (string, error)\n```\n\n```go\ntype StateStore struct {\n\tsync.RWMutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewStateStore() *StateStore\n```\n\n```go\nfunc (s *StateStore) Add(state string, chatId int64)\n```\n\n```go\nfunc (s *StateStore) Delete(key string)\n```\n\n```go\nfunc (s *StateStore) Get(state string) (int64, error)\n```\n\n```go\ntype Store struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(path string) *Store\n```\n\n```go\nfunc (s *Store) Add(chatId int64, accessToken string) error\n```\n\n```go\nfunc (s *Store) Delete(chatId int64) error\n```\n\n```go\nfunc (s *Store) Get(chatId int64) (string, error)\n```\n\n```go\ntype User struct {\n\t// contains filtered or unexported fields\n}\n```\n\n","path":"github.com/proshik/githubstatbot/storage","name":"storage","synopsis":"","isRedistributable":true}
