Documentation
¶
Index ¶
- Constants
- func GetCommandQueueUrl(host string) string
- type BucketClient
- type Config
- type Message
- type Queue
- type S3
- func (s S3) Delete(bucket, fileName string, ctx context.Context) error
- func (s S3) Exist(bucket string, fileName string) (bool, error)
- func (s S3) Get(bucket, fileName string, ctx context.Context) ([]byte, error)
- func (s S3) Put(bucket, fileName string, content []byte, ctx context.Context) (string, error)
- type S3Storage
- func (s *S3Storage) GetNotes(dir string, name string, ctx context.Context) (string, error)
- func (s *S3Storage) GetUserInfo(name string, ctx context.Context) (models.UserInfo, error)
- func (s *S3Storage) IsUserExist(login string) (bool, error)
- func (s *S3Storage) PutNotes(dir string, note models.Note, ctx context.Context) error
- func (s *S3Storage) PutUser(userInfo models.UserInfo, ctx context.Context) error
- type SqsClient
- type Storage
Constants ¶
View Source
const ( UsersBucket = "users" NotesBucket = "notes" )
View Source
const (
CommandQueue = "000000000000/commandQueue"
)
Variables ¶
This section is empty.
Functions ¶
func GetCommandQueueUrl ¶
Types ¶
type BucketClient ¶
type BucketClient interface { Put(bucket, fileName string, content []byte, ctx context.Context) (string, error) Delete(bucket, fileName string, ctx context.Context) error Get(bucket, fileName string, ctx context.Context) ([]byte, error) Exist(bucket string, fileName string) (bool, error) }
func NewS3 ¶
func NewS3(config Config) BucketClient
type Queue ¶
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
func (*S3Storage) GetUserInfo ¶
type Storage ¶
type Storage interface { GetUserInfo(name string, ctx context.Context) (models.UserInfo, error) PutUser(userInfo models.UserInfo, ctx context.Context) error IsUserExist(login string) (bool, error) PutNotes(dir string, note models.Note, ctx context.Context) error GetNotes(dir string, name string, ctx context.Context) (string, error) }
func NewStorage ¶
func NewStorage(s3 BucketClient) Storage
Click to show internal directories.
Click to hide internal directories.