Documentation ¶
Index ¶
- type Database
- type ServerStorage
- func (s *ServerStorage) Create(ctx context.Context, server *model.Server) (*model.Server, error)
- func (s *ServerStorage) Delete(ctx context.Context, ID uuid.UUID) error
- func (s *ServerStorage) GetByID(ctx context.Context, id uuid.UUID) (*model.Server, error)
- func (s *ServerStorage) GetByName(ctx context.Context, name string) (*model.Server, error)
- func (s *ServerStorage) List(ctx context.Context) ([]*model.Server, error)
- func (s *ServerStorage) Save() error
- func (s *ServerStorage) Update(ctx context.Context, server *model.Server) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Create(context.Context, *model.Server) (*model.Server, error) List(context.Context) ([]*model.Server, error) GetByName(context.Context, string) (*model.Server, error) GetByID(context.Context, uuid.UUID) (*model.Server, error) Delete(context.Context, uuid.UUID) error Update(context.Context, *model.Server) error Save() error }
type ServerStorage ¶
type ServerStorage struct {
// contains filtered or unexported fields
}
func NewServerStorage ¶
func NewServerStorage(ctx context.Context, filename string) (*ServerStorage, error)
func (*ServerStorage) Save ¶
func (s *ServerStorage) Save() error
Click to show internal directories.
Click to hide internal directories.