Documentation ¶
Index ¶
- Variables
- type Service
- func (s Service) DeleteText(ctx context.Context, uid, id string) error
- func (s Service) GetAllTexts(ctx context.Context, uid string) ([]Text, error)
- func (s Service) GetTextByID(ctx context.Context, uid, id string) (Text, error)
- func (s Service) StoreText(ctx context.Context, text Text) (string, error)
- type Text
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalid = errors.New("passed text data is invalid") ErrNotFound = errors.New("requested text data not found") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService returns an instance of the Service with pre-defined data microservice.
func (Service) DeleteText ¶
DeleteText removes the stored data with the unique ID. The method removes the data of the specified user only.
func (Service) GetAllTexts ¶
GetAllTexts returns all the user's stored texts.
func (Service) GetTextByID ¶
GetTextByID returns the stored data by the unique ID. The method returns the data of the specified user only.
Click to show internal directories.
Click to hide internal directories.