Documentation ¶
Index ¶
- Constants
- Variables
- func MessageTask(workouts []Workout, today, tomorrow time.Time) string
- func NewDate(t time.Time) time.Time
- type Bot
- type Clock
- type Config
- type FinalSurge
- type FinalSurgeAPI
- type FinalSurgeActivity
- type FinalSurgeLogin
- type FinalSurgeLoginData
- type FinalSurgeLoginReq
- type FinalSurgeStatus
- type FinalSurgeWorkoutData
- type FinalSurgeWorkoutList
- type Postgres
- type RealClock
- type Sender
- type Storage
- type UserToken
- type Workout
Constants ¶
View Source
const ( CommandStart = "start" KeyboardButtonTask = "/task" Emails = 100 )
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) Keyboard ¶
func (b *Bot) Keyboard() tgbotapi.ReplyKeyboardMarkup
type Config ¶
type Config struct { Debug bool `envconfig:"DEBUG"` PublicURL string `envconfig:"PUBLIC_URL" required:"true"` BotAPIKey string `envconfig:"BOT_API_KEY" required:"true"` Port int `envconfig:"PORT" required:"true"` DatabaseURL string `envconfig:"DATABASE_URL" required:"true"` RunOnCloud bool `envconfig:"RUN_ON_CLOUD"` }
type FinalSurge ¶
type FinalSurgeAPI ¶
type FinalSurgeAPI struct {
// contains filtered or unexported fields
}
func NewFinalSurgeAPI ¶
func NewFinalSurgeAPI(client *http.Client) *FinalSurgeAPI
type FinalSurgeActivity ¶
type FinalSurgeActivity struct {
ActivityTypeName string `json:"activity_type_name"`
}
type FinalSurgeLogin ¶
type FinalSurgeLogin struct { FinalSurgeStatus Data FinalSurgeLoginData `json:"data"` }
type FinalSurgeLoginData ¶
type FinalSurgeLoginReq ¶
type FinalSurgeStatus ¶
type FinalSurgeWorkoutData ¶
type FinalSurgeWorkoutData struct { WorkoutDate string `json:"workout_date"` Description *string `json:"description"` Activities []FinalSurgeActivity `json:"activities"` }
type FinalSurgeWorkoutList ¶
type FinalSurgeWorkoutList struct { FinalSurgeStatus Data []FinalSurgeWorkoutData `json:"data"` }
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func (*Postgres) UpdateUserToken ¶
Click to show internal directories.
Click to hide internal directories.