Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func NewSQLiteDB(path string) (*sql.DB, error)
 - func RunMigrations(ctx context.Context, db *sql.DB) error
 - type AssetRepo
 - func (ar *AssetRepo) Create(ctx context.Context, exec bob.Executor, asset *entities.Asset) error
 - func (ar *AssetRepo) Delete(ctx context.Context, exec bob.Executor, id int64) error
 - func (ar *AssetRepo) Get(ctx context.Context, exec bob.Executor, query database.GetAssetQuery) (*entities.Asset, error)
 - func (ar *AssetRepo) List(ctx context.Context, exec bob.Executor, query database.ListAssetsQuery) (*entities.ListPage[*entities.Asset], error)
 - func (ar *AssetRepo) Update(ctx context.Context, exec bob.Executor, asset *entities.Asset) error
 
- type CategoryRepo
 - type CustomAttrRepo
 - type FileRepo
 - func (fr *FileRepo) Create(ctx context.Context, exec bob.Executor, file *entities.File) (int64, error)
 - func (fr *FileRepo) Delete(ctx context.Context, exec bob.Executor, ids []int64) error
 - func (fr *FileRepo) Get(ctx context.Context, exec bob.Executor, id int64) (*entities.File, error)
 - func (fr *FileRepo) GetByPublicPath(ctx context.Context, exec bob.Executor, publicPath string) (*entities.File, error)
 - func (fr *FileRepo) List(ctx context.Context, exec bob.Executor, query database.ListFilesQuery) (*entities.ListPage[*entities.File], error)
 
- type LocalAuthRepo
 - func (*LocalAuthRepo) Create(ctx context.Context, exec bob.Executor, user *auth.LocalAuthUser) error
 - func (*LocalAuthRepo) DeleteByUsername(ctx context.Context, exec bob.Executor, username string) error
 - func (*LocalAuthRepo) Get(ctx context.Context, exec bob.Executor, username string) (*auth.LocalAuthUser, error)
 - func (*LocalAuthRepo) Update(ctx context.Context, exec bob.Executor, user *auth.LocalAuthUser) error
 
- type LocationRepo
 - func (cr *LocationRepo) ListLocations(ctx context.Context, exec bob.Executor, query database.ListLocationsQuery) (*entities.ListPage[*entities.Location], error)
 - func (cr *LocationRepo) ListPositionCodes(ctx context.Context, exec bob.Executor, query database.ListPositionCodesQuery) (*entities.ListPage[*entities.PositionCode], error)
 
- type ManufacturerRepo
 - type ModelRepo
 - type SQLiteSessionStore
 - type SupplierRepo
 - type TagRepo
 - func (*TagRepo) Create(ctx context.Context, exec bob.Executor, tag *entities.Tag) error
 - func (*TagRepo) Delete(ctx context.Context, exec bob.Executor, tag string) error
 - func (*TagRepo) Get(ctx context.Context, exec bob.Executor, tag string) (*entities.Tag, error)
 - func (*TagRepo) GetUnused(ctx context.Context, exec bob.Executor) (*entities.Tag, error)
 - func (*TagRepo) List(ctx context.Context, exec bob.Executor, query database.ListTagsQuery) (*entities.ListPage[*entities.Tag], error)
 - func (*TagRepo) MarkTagUnused(ctx context.Context, exec bob.Executor, tag string) error
 - func (*TagRepo) MarkTagUsed(ctx context.Context, exec bob.Executor, tag string) error
 - func (*TagRepo) NextSequential(ctx context.Context, exec bob.Executor) (int64, error)
 
- type UserRepo
 - func (*UserRepo) CountAdmins(ctx context.Context, exec bob.Executor) (int64, error)
 - func (*UserRepo) Create(ctx context.Context, exec bob.Executor, toCreate *auth.User) error
 - func (*UserRepo) Delete(ctx context.Context, exec bob.Executor, id int64) error
 - func (*UserRepo) Get(ctx context.Context, exec bob.Executor, id int64) (*auth.User, error)
 - func (*UserRepo) GetByRef(ctx context.Context, exec bob.Executor, ref string) (*auth.User, error)
 - func (*UserRepo) GetByUsername(ctx context.Context, exec bob.Executor, username string) (*auth.User, error)
 - func (*UserRepo) List(ctx context.Context, exec bob.Executor, query database.ListUsersQuery) (*entities.ListPage[*auth.User], error)
 - func (*UserRepo) Update(ctx context.Context, exec bob.Executor, toUpdate *auth.User) error
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var ErrAssetNotFound = errors.New("asset not found")
    
      View Source
      
  
    var ErrFileNotFound = errors.New("file not found")
    
      View Source
      
  
    var ErrLocalAuthUserNotFound = errors.New("user for local auth not found")
    
      View Source
      
  
    var ErrTagNotFound = errors.New("tag not found")
    
      View Source
      
  
var ErrUserNotFound = errors.New("user not found")
    Functions ¶
Types ¶
type AssetRepo ¶ added in v0.3.0
type AssetRepo struct{}
    type CategoryRepo ¶ added in v0.3.0
type CategoryRepo struct{}
    type CustomAttrRepo ¶ added in v0.3.0
type CustomAttrRepo struct{}
    func (*CustomAttrRepo) List ¶ added in v0.3.0
func (cr *CustomAttrRepo) List(ctx context.Context, exec bob.Executor, query database.ListCustomAttrsQuery) (*entities.ListPage[*entities.CustomAttr], error)
type FileRepo ¶ added in v0.3.0
type FileRepo struct{}
    func (*FileRepo) GetByPublicPath ¶ added in v0.3.0
type LocalAuthRepo ¶ added in v0.3.0
type LocalAuthRepo struct{}
    func (*LocalAuthRepo) Create ¶ added in v0.3.0
func (*LocalAuthRepo) Create(ctx context.Context, exec bob.Executor, user *auth.LocalAuthUser) error
func (*LocalAuthRepo) DeleteByUsername ¶ added in v0.3.0
func (*LocalAuthRepo) Get ¶ added in v0.3.0
func (*LocalAuthRepo) Get(ctx context.Context, exec bob.Executor, username string) (*auth.LocalAuthUser, error)
func (*LocalAuthRepo) Update ¶ added in v0.3.0
func (*LocalAuthRepo) Update(ctx context.Context, exec bob.Executor, user *auth.LocalAuthUser) error
type LocationRepo ¶ added in v0.3.0
type LocationRepo struct{}
    func (*LocationRepo) ListLocations ¶ added in v0.3.0
func (*LocationRepo) ListPositionCodes ¶ added in v0.3.0
func (cr *LocationRepo) ListPositionCodes(ctx context.Context, exec bob.Executor, query database.ListPositionCodesQuery) (*entities.ListPage[*entities.PositionCode], error)
type ManufacturerRepo ¶ added in v0.3.0
type ManufacturerRepo struct{}
    func (*ManufacturerRepo) List ¶ added in v0.3.0
func (cr *ManufacturerRepo) List(ctx context.Context, exec bob.Executor, query database.ListManufacturersQuery) (*entities.ListPage[*entities.Manufacturer], error)
type SQLiteSessionStore ¶
type SQLiteSessionStore struct {
	// contains filtered or unexported fields
}
    func NewSQLiteSessionStore ¶
func NewSQLiteSessionStore(db bob.Executor) *SQLiteSessionStore
func (*SQLiteSessionStore) Delete ¶
func (s *SQLiteSessionStore) Delete(token string) error
type SupplierRepo ¶ added in v0.3.0
type SupplierRepo struct{}
    type TagRepo ¶ added in v0.3.0
type TagRepo struct{}
    func (*TagRepo) MarkTagUnused ¶ added in v0.3.0
func (*TagRepo) MarkTagUsed ¶ added in v0.3.0
type UserRepo ¶ added in v0.3.0
type UserRepo struct{}
    func (*UserRepo) CountAdmins ¶ added in v0.3.0
func (*UserRepo) GetByUsername ¶ added in v0.3.0
      
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.