item

package
v0.0.0-...-37f97d0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthItem        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowItem          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupItem = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type App

type App interface {
	Store
}

Application layer for item domain.

type Component

type Component struct {
	Type github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,1,opt,name=Type,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"Type"`
}

Component represents a common object used for craft only.

func NewPopulatedComponent

func NewPopulatedComponent(r randyItem, easy bool) *Component

func (*Component) Descriptor

func (*Component) Descriptor() ([]byte, []int)

func (*Component) Equal

func (this *Component) Equal(that interface{}) bool

func (*Component) GoString

func (this *Component) GoString() string

func (*Component) Marshal

func (m *Component) Marshal() (dAtA []byte, err error)

func (*Component) MarshalTo

func (m *Component) MarshalTo(dAtA []byte) (int, error)

func (*Component) MarshalToSizedBuffer

func (m *Component) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Component) ProtoMessage

func (*Component) ProtoMessage()

func (*Component) Reset

func (m *Component) Reset()

func (*Component) Size

func (m *Component) Size() (n int)

func (*Component) String

func (this *Component) String() string

func (*Component) Unmarshal

func (m *Component) Unmarshal(dAtA []byte) error

func (*Component) XXX_DiscardUnknown

func (m *Component) XXX_DiscardUnknown()

func (*Component) XXX_Marshal

func (m *Component) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Component) XXX_Merge

func (m *Component) XXX_Merge(src proto.Message)

func (*Component) XXX_Size

func (m *Component) XXX_Size() int

func (*Component) XXX_Unmarshal

func (m *Component) XXX_Unmarshal(b []byte) error

type Filter

type Filter struct {
	ID  gulid.ID
	IDs []gulid.ID
}

Filter object for item domain.

type I

type I struct {
	ID      github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"ID"`
	Name    string                                `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Details string                                `protobuf:"bytes,3,opt,name=Details,proto3" json:"Details,omitempty"`
	Icon    github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,4,opt,name=Icon,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"Icon"`
	Type    Type                                  `protobuf:"bytes,5,opt,name=Type,proto3" json:"Type"`
}

func NewPopulatedI

func NewPopulatedI(r randyItem, easy bool) *I

func (*I) Descriptor

func (*I) Descriptor() ([]byte, []int)

func (*I) Equal

func (this *I) Equal(that interface{}) bool

func (*I) GetDetails

func (m *I) GetDetails() string

func (*I) GetName

func (m *I) GetName() string

func (*I) GetType

func (m *I) GetType() Type

func (*I) GoString

func (this *I) GoString() string

func (*I) Marshal

func (m *I) Marshal() (dAtA []byte, err error)

func (*I) MarshalTo

func (m *I) MarshalTo(dAtA []byte) (int, error)

func (*I) MarshalToSizedBuffer

func (m *I) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*I) ProtoMessage

func (*I) ProtoMessage()

func (*I) Reset

func (m *I) Reset()

func (*I) Size

func (m *I) Size() (n int)

func (*I) String

func (this *I) String() string

func (*I) Unmarshal

func (m *I) Unmarshal(dAtA []byte) error

func (*I) XXX_DiscardUnknown

func (m *I) XXX_DiscardUnknown()

func (*I) XXX_Marshal

func (m *I) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*I) XXX_Merge

func (m *I) XXX_Merge(src proto.Message)

func (*I) XXX_Size

func (m *I) XXX_Size() int

func (*I) XXX_Unmarshal

func (m *I) XXX_Unmarshal(b []byte) error

type Orb

type Orb struct {
	AbilityID github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,1,opt,name=AbilityID,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"AbilityID"`
}

Orb represents a skill learner object. Consumer learns skill at item consumption.

func NewPopulatedOrb

func NewPopulatedOrb(r randyItem, easy bool) *Orb

func (*Orb) Descriptor

func (*Orb) Descriptor() ([]byte, []int)

func (*Orb) Equal

func (this *Orb) Equal(that interface{}) bool

func (*Orb) GoString

func (this *Orb) GoString() string

func (*Orb) Marshal

func (m *Orb) Marshal() (dAtA []byte, err error)

func (*Orb) MarshalTo

func (m *Orb) MarshalTo(dAtA []byte) (int, error)

func (*Orb) MarshalToSizedBuffer

func (m *Orb) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Orb) ProtoMessage

func (*Orb) ProtoMessage()

func (*Orb) Reset

func (m *Orb) Reset()

func (*Orb) Size

func (m *Orb) Size() (n int)

func (*Orb) String

func (this *Orb) String() string

func (*Orb) Unmarshal

func (m *Orb) Unmarshal(dAtA []byte) error

func (*Orb) XXX_DiscardUnknown

func (m *Orb) XXX_DiscardUnknown()

func (*Orb) XXX_Marshal

func (m *Orb) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Orb) XXX_Merge

func (m *Orb) XXX_Merge(src proto.Message)

func (*Orb) XXX_Size

func (m *Orb) XXX_Size() int

func (*Orb) XXX_Unmarshal

func (m *Orb) XXX_Unmarshal(b []byte) error

type Store

type Store interface {
	Upsert(context.Context, I) error
	Fetch(context.Context, Filter) (I, error)
	FetchMany(context.Context, Filter) (map[string]I, error)
	Delete(context.Context, Filter) error
}

Store layer for item domain.

type Type

type Type struct {
	Orb       *Orb       `protobuf:"bytes,1,opt,name=Orb,proto3" json:"Orb,omitempty"`
	Component *Component `protobuf:"bytes,2,opt,name=Component,proto3" json:"Component,omitempty"`
}

func NewPopulatedType

func NewPopulatedType(r randyItem, easy bool) *Type

func (*Type) Descriptor

func (*Type) Descriptor() ([]byte, []int)

func (*Type) Equal

func (this *Type) Equal(that interface{}) bool

func (*Type) GetComponent

func (m *Type) GetComponent() *Component

func (*Type) GetOrb

func (m *Type) GetOrb() *Orb

func (*Type) GetValue

func (this *Type) GetValue() interface{}

func (*Type) GoString

func (this *Type) GoString() string

func (*Type) Marshal

func (m *Type) Marshal() (dAtA []byte, err error)

func (*Type) MarshalTo

func (m *Type) MarshalTo(dAtA []byte) (int, error)

func (*Type) MarshalToSizedBuffer

func (m *Type) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) Reset

func (m *Type) Reset()

func (*Type) SetValue

func (this *Type) SetValue(value interface{}) bool

func (*Type) Size

func (m *Type) Size() (n int)

func (*Type) String

func (this *Type) String() string

func (*Type) Unmarshal

func (m *Type) Unmarshal(dAtA []byte) error

func (*Type) XXX_DiscardUnknown

func (m *Type) XXX_DiscardUnknown()

func (*Type) XXX_Marshal

func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Type) XXX_Merge

func (m *Type) XXX_Merge(src proto.Message)

func (*Type) XXX_Size

func (m *Type) XXX_Size() int

func (*Type) XXX_Unmarshal

func (m *Type) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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