usecase

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Usecase

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

func New

func New(repo trafficrouter.Repository) *Usecase

New creates a new instance of Usecase.

func (*Usecase) Approve

func (uc *Usecase) Approve(ctx context.Context, id uint64, message string) error

Approve approves the router by id

func (*Usecase) Count

func (uc *Usecase) Count(ctx context.Context, qops ...trafficrouter.Option) (int64, error)

Count returns the total number of TrafficRouter objects.

func (*Usecase) Create

func (uc *Usecase) Create(ctx context.Context, router *models.TrafficRouter) (uint64, error)

Create creates a new TrafficRouter object.

func (*Usecase) Delete

func (uc *Usecase) Delete(ctx context.Context, id uint64) error

Delete removes the object by id

func (*Usecase) FetchList

func (uc *Usecase) FetchList(ctx context.Context, qops ...trafficrouter.Option) ([]*models.TrafficRouter, error)

FetchList retrieves a list of TrafficRouter objects.

func (*Usecase) Get

func (uc *Usecase) Get(ctx context.Context, id uint64) (*models.TrafficRouter, error)

Get returns the object by id

func (*Usecase) Pause

func (uc *Usecase) Pause(ctx context.Context, id uint64, message string) error

Pause stops the router by id

func (*Usecase) Reject

func (uc *Usecase) Reject(ctx context.Context, id uint64, message string) error

Reject rejects the router by id

func (*Usecase) Run

func (uc *Usecase) Run(ctx context.Context, id uint64, message string) error

Run starts the router by id

func (*Usecase) Update

func (uc *Usecase) Update(ctx context.Context, id uint64, router *models.TrafficRouter) error

Update updates an existing TrafficRouter object.

Jump to

Keyboard shortcuts

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