Documentation ¶
Index ¶
- type DB
- type Iface
- type MyDB
- type Storage
- func (s *Storage) Create(ctx context.Context, employee pb.Employee) (string, error)
- func (s *Storage) Delete(ctx context.Context, ID string) error
- func (s *Storage) Get(ctx context.Context, ID string) (*pb.Employee, error)
- func (s *Storage) Update(ctx context.Context, ID string, employee pb.Employee) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iface ¶
type Iface interface { Get(ctx context.Context, ID string) (*pb.Employee, error) Create(ctx context.Context, employee pb.Employee) (string, error) Update(ctx context.Context, ID string, employee pb.Employee) error Delete(ctx context.Context, ID string) error }
Iface - storage interface
type MyDB ¶
type MyDB interface { Set(ctx context.Context, key, value interface{}) error Get(key interface{}) (interface{}, error) Delete(key interface{}) error }
MyDB - my in memory database
Click to show internal directories.
Click to hide internal directories.