Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var IsRecordNotFoundError = gorm.IsRecordNotFoundError
IsRecordNotFoundError returns true if the given error is caused by a missing record.
Functions ¶
This section is empty.
Types ¶
type Bird ¶
type Bird struct {
BirdApp BirdApp
}
Bird provide core functionalities of memobird.
func (*Bird) BindBirdWithMessage ¶
func (b *Bird) BindBirdWithMessage(birdID, msg string) (*memobird.PrintResult, error)
BindBirdWithMessage binds birdID and sends given message to bird.
func (*Bird) PrintTextToBird ¶
func (b *Bird) PrintTextToBird(birdID, text string) (*memobird.PrintResult, error)
PrintTextToBird sends given text to memobird of birdID for printing.
type BirdApp ¶
type BirdApp interface { PrintText(text string, birdID string) (*memobird.PrintResult, error) BindDevice(deviceID string) (*memobird.BindResult, error) }
BirdApp represents the ability to interact with a memobird.
type Device ¶
Device provides core functionalities of device.
func (*Device) GetByUserID ¶
GetByUserID returns Device with given userID.
func (*Device) IsFree ¶
IsFree returns true if given deviceID doesn't exist or not owned by other users.
type User ¶
User provides core functionalities of user.
func (*User) GetByTelegramID ¶
GetByTelegramID returns user of given telegram ID.
func (*User) IsExistsByTelegramID ¶
IsExistsByTelegramID returns true if given telegramID already exists.