application

package
v0.0.0-...-454c3e9 Latest Latest
Warning

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

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

Documentation

Overview

Package application present full API functionality of the specific object

Package application 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
	Title    string
	URI      string
	Type     []models.ApplicationType
	Platform []models.PlatformType
	Permium  *bool
	Status   *types.ApproveStatus
	Active   *types.ActiveStatus
}

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

	Title models.Order
	URI   models.Order

	Type     models.Order
	Platform models.Order
	Premium  models.Order
	Status   models.Order
	Active   models.Order

	CreatedAt models.Order
	UpdatedAt 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

type Options

type Options = repository.ListOptions

type Repository

type Repository interface {
	Get(ctx context.Context, id uint64) (*models.Application, error)
	FetchList(ctx context.Context, qops ...Option) ([]*models.Application, error)
	Count(ctx context.Context, qops ...Option) (int64, error)

	Create(ctx context.Context, source *models.Application) (uint64, error)
	Update(ctx context.Context, id uint64, source *models.Application) error
	Delete(ctx context.Context, id uint64, msg string) error

	Run(ctx context.Context, id uint64, msg string) error
	Pause(ctx context.Context, id uint64, msg string) error
	Approve(ctx context.Context, id uint64, msg string) error
	Reject(ctx context.Context, id uint64, msg string) error
}

Repository of access to the application

type Usecase

type Usecase interface {
	Get(ctx context.Context, id uint64) (*models.Application, error)
	FetchList(ctx context.Context, qops ...Option) ([]*models.Application, error)
	Count(ctx context.Context, qops ...Option) (int64, error)

	Create(ctx context.Context, source *models.Application) (uint64, error)
	Update(ctx context.Context, id uint64, source *models.Application) error
	Delete(ctx context.Context, id uint64, msg string) error

	Run(ctx context.Context, id uint64, msg string) error
	Pause(ctx context.Context, id uint64, msg string) error
	Approve(ctx context.Context, id uint64, msg string) error
	Reject(ctx context.Context, id uint64, msg string) error
}

Usecase of access to the application

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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