account

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type A

type A 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"`
	Email    string                                 `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"`
	Password []byte                                 `protobuf:"bytes,3,opt,name=Password,proto3" json:"Password,omitempty"`
	Alias    string                                 `protobuf:"bytes,4,opt,name=Alias,proto3" json:"Alias,omitempty"`
	Token    *github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,5,opt,name=Token,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"Token,omitempty"`
	Room     *github_com_elojah_game_02_pkg_ulid.ID `protobuf:"bytes,6,opt,name=Room,proto3,customtype=github.com/elojah/game_02/pkg/ulid.ID" json:"Room,omitempty"`
}

func NewPopulatedA

func NewPopulatedA(r randyAccount, easy bool) *A

func (*A) Descriptor

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

func (*A) Equal

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

func (*A) GetAlias

func (m *A) GetAlias() string

func (*A) GetEmail

func (m *A) GetEmail() string

func (*A) GetPassword

func (m *A) GetPassword() []byte

func (*A) GoString

func (this *A) GoString() string

func (*A) Marshal

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

func (*A) MarshalTo

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

func (*A) MarshalToSizedBuffer

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

func (*A) ProtoMessage

func (*A) ProtoMessage()

func (*A) Reset

func (m *A) Reset()

func (*A) Size

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

func (*A) String

func (this *A) String() string

func (*A) Unmarshal

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

func (*A) XXX_DiscardUnknown

func (m *A) XXX_DiscardUnknown()

func (*A) XXX_Marshal

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

func (*A) XXX_Merge

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

func (*A) XXX_Size

func (m *A) XXX_Size() int

func (*A) XXX_Unmarshal

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

type App

type App interface {
	Store
	StoreEmail
	Signin(context.Context, string, string) (A, error)
	Signout(context.Context, gulid.ID, gulid.ID) (A, error)
	Authorize(context.Context, gulid.ID, gulid.ID) (A, error)
}

Application layer for account domain.

type Filter

type Filter struct {
	ID gulid.ID
}

Filter object for account domain.

type FilterEmail

type FilterEmail struct {
	Email string
}

Filter object for account email domain.

type Store

type Store interface {
	Upsert(context.Context, A) error
	Fetch(context.Context, Filter) (A, error)
	Delete(context.Context, Filter) error
}

Store layer for account domain.

type StoreEmail

type StoreEmail interface {
	UpsertEmail(context.Context, A) error
	FetchEmail(context.Context, FilterEmail) (gulid.ID, error)
	DeleteEmail(context.Context, FilterEmail) error
}

Store layer for account email relation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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