store

package
v0.0.0-...-c210651 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCollaboratorStore

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

func NewFileCollaboratorStore

func NewFileCollaboratorStore(db *gorm.DB) *FileCollaboratorStore

func (*FileCollaboratorStore) CreateFileCollaborator

func (s *FileCollaboratorStore) CreateFileCollaborator(claims *auth.Claims, fileCollaborator *models.FileCollaborator) (*models.FileCollaborator, error)

func (*FileCollaboratorStore) DeleteFileCollaborator

func (s *FileCollaboratorStore) DeleteFileCollaborator(claims *auth.Claims, fileID, collaboratorID string) (*models.FileCollaborator, error)

func (*FileCollaboratorStore) GetFileCollaborators

func (s *FileCollaboratorStore) GetFileCollaborators(after, before *string, first, last *int, fileID string, username *string, permission models.FilePermission) (*models.FileCollaboratorConnection, error)

type FileStore

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

func NewFileStore

func NewFileStore(db *gorm.DB) *FileStore

func (*FileStore) CreateFile

func (s *FileStore) CreateFile(file *models.File) (*models.File, error)

func (*FileStore) DeleteFile

func (s *FileStore) DeleteFile(file *models.File) (*models.File, error)

func (*FileStore) GetAllFiles

func (s *FileStore) GetAllFiles(claims *auth.Claims, after, before *string, first, last *int, name *string, permission models.FilePermission, tags []string) (*models.FileConnection, error)

func (*FileStore) GetFile

func (s *FileStore) GetFile(claims *auth.Claims, permission models.FilePermission, query interface{}, args ...interface{}) (*models.File, error)

func (*FileStore) UpdateFile

func (s *FileStore) UpdateFile(file *models.File) (*models.File, error)

type FileTagStore

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

func NewFileTagStore

func NewFileTagStore(db *gorm.DB) *FileTagStore

func (*FileTagStore) DeleteFileTags

func (s *FileTagStore) DeleteFileTags(claims *auth.Claims, fileTagsInput models.FileTagsInput) ([]*models.FileTag, error)

func (*FileTagStore) GetFileTags

func (s *FileTagStore) GetFileTags(after, before *string, first, last *int, fileID string, name *string) (*models.FileTagConnection, error)

type Store

type Store struct {
	User             *UserStore
	File             *FileStore
	FileTag          *FileTagStore
	FileCollaborator *FileCollaboratorStore
	Tag              *TagStore
}

func New

func New(db *gorm.DB) *Store

type TagStore

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

func NewTagStore

func NewTagStore(db *gorm.DB) *TagStore

func (*TagStore) CreateTagsOrAppendFileTags

func (s *TagStore) CreateTagsOrAppendFileTags(claims *auth.Claims, tags []*models.Tag) ([]*models.Tag, error)

func (*TagStore) GetAllTags

func (s *TagStore) GetAllTags(after, before *string, first, last *int, name *string) (*models.TagConnection, error)

func (*TagStore) GetTag

func (s *TagStore) GetTag(query interface{}, args ...interface{}) (*models.Tag, error)

type UserStore

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

func NewUserStore

func NewUserStore(db *gorm.DB) *UserStore

func (*UserStore) CreateUser

func (s *UserStore) CreateUser(user *models.User) (*models.User, error)

func (*UserStore) DeleteUser

func (s *UserStore) DeleteUser(query interface{}, args ...interface{}) (*models.User, error)

func (*UserStore) GetAllUsers

func (s *UserStore) GetAllUsers(after, before *string, first, last *int, username *string) (*models.UserConnection, error)

func (*UserStore) GetUser

func (s *UserStore) GetUser(query interface{}, args ...interface{}) (*models.User, error)

func (*UserStore) UpdateUser

func (s *UserStore) UpdateUser(user *models.User) (*models.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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