devicemodel

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package devicemodel present full API functionality of the specific object

Package devicemodel present full API functionality of the specific object

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	ID            []uint64
	Codename      []string
	Name          []string
	ParentID      []uint64
	Active        *types.ActiveStatus
	MakerCodename []string
	TypeCodename  []string
}

Filter of the objects list

func (*Filter) PrepareQuery

func (fl *Filter) PrepareQuery(query *gorm.DB) *gorm.DB

type ListOrder

type ListOrder struct {
	ID            models.Order
	Codename      models.Order
	Name          models.Order
	TypeCodename  models.Order
	MakerCodename models.Order
	Active        models.Order
	CreatedAt     models.Order
	UpdatedAt     models.Order
	YearRelease   models.Order
}

ListOrder of the objects list

func (*ListOrder) PrepareQuery

func (ol *ListOrder) PrepareQuery(query *gorm.DB) *gorm.DB

type Option

type Option = repository.QOption

List select options

type Options

type Options = repository.ListOptions

List select options

type Repository

type Repository interface {
	Get(ctx context.Context, id uint64) (*models.DeviceModel, error)
	GetByCodename(ctx context.Context, codename string) (*models.DeviceModel, error)
	FetchList(ctx context.Context, qops ...Option) ([]*models.DeviceModel, error)
	Count(ctx context.Context, qops ...Option) (int64, error)
	Create(ctx context.Context, object *models.DeviceModel) (uint64, error)
	Update(ctx context.Context, id uint64, object *models.DeviceModel) error
	Delete(ctx context.Context, id uint64) error
}

Repository of access to the devicemodel

type Usecase

type Usecase interface {
	Get(ctx context.Context, id uint64) (*models.DeviceModel, error)
	GetByCodename(ctx context.Context, codename string) (*models.DeviceModel, error)
	FetchList(ctx context.Context, qops ...Option) ([]*models.DeviceModel, error)
	Count(ctx context.Context, qops ...Option) (int64, error)
	Create(ctx context.Context, object *models.DeviceModel) (uint64, error)
	Update(ctx context.Context, id uint64, object *models.DeviceModel) error
	Delete(ctx context.Context, id uint64, msg *string) error
}

usecase of access to the devicemodel

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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