modify_bbox

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0, GPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePresenter

type FakePresenter struct {
	GotSuccess bool
	t.TestingErrPresenter
}

func (*FakePresenter) SuccessUpdateBox

func (p *FakePresenter) SuccessUpdateBox(Response)

type FakeRepo

type FakeRepo struct {
	Err            error
	ErrOnUpdate    bool
	ErrOnFindLabel bool
	Got            a.BoundingBoxUpdatables
	Label          lbl.Label
}

func (*FakeRepo) FindLabel

func (r *FakeRepo) FindLabel(name string) (*lbl.Label, error)

func (*FakeRepo) GroupOfAnnotation

func (r *FakeRepo) GroupOfAnnotation(id a.AnnotationId) (*string, error)

func (*FakeRepo) UpdateBoundingBox

func (r *FakeRepo) UpdateBoundingBox(id a.AnnotationId, u a.BoundingBoxUpdatables) error

type Interactor

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

func NewInteractor

func NewInteractor(repo Repo, opts ...Option) *Interactor

func (*Interactor) Execute

func (i *Interactor) Execute(ctx context.Context, r Request, out OutputPort)

type Interface

type Interface interface {
	Execute(context.Context, Request, OutputPort)
}

type Option

type Option func(*Interactor)

func WithAuth

func WithAuth(a auth.Auth) Option

type OutputPort

type OutputPort interface {
	Error(error)
	SuccessUpdateBox(Response)
}

type Repo

type Repo interface {
	FindLabel(string) (*lbl.Label, error)
	UpdateBoundingBox(a.AnnotationId, a.BoundingBoxUpdatables) error
	GroupOfAnnotation(a.AnnotationId) (*string, error)
}

type Request

type Request struct {
	AnnotationId string
	Label        string
	Xc           float32
	Yc           float32
	Width        float32
	Height       float32
}

type Response

type Response struct {
	AnnotationId a.AnnotationId
	Label        string
	Xc           float32
	Yc           float32
	Width        float32
	Height       float32
}

Jump to

Keyboard shortcuts

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