product

package
v0.0.0-...-0948bf3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOptions

func NewOptions() *options

NewOptions new options struct

func PrintOptions

func PrintOptions(packageName string)

Types

type CreateCmd

type CreateCmd struct {
	Name  string
	Price types.Fen
}

func (CreateCmd) Handle

func (c CreateCmd) Handle(ctx context.Context, a *Product) error

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option option interface

func SkipOption

func SkipOption() Option

func WithName

func WithName(name string) Option

WithName name option of Product

func WithOptions

func WithOptions(o *options) Option

func WithPrice

func WithPrice(price types.Fen) Option

WithPrice price option of Product

type Product

type Product struct {
	dgo.AggBase
	// contains filtered or unexported fields
}

func New

func New(aggBase dgo.AggBase, _opts ...Option) *Product

New constructor

func (*Product) Name

func (p *Product) Name() string

func (*Product) Price

func (p *Product) Price() types.Fen

func (*Product) SetOptions

func (_p *Product) SetOptions(_opts ...Option) *Product

Jump to

Keyboard shortcuts

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