Draft: feat login
This commit is contained in:
30
plays/base.go
Normal file
30
plays/base.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package plays
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/go-resty/resty/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
tick = 100 * time.Millisecond
|
||||
)
|
||||
|
||||
type TickMsg time.Time
|
||||
|
||||
func Tick() tea.Cmd {
|
||||
return tea.Tick(tick, func(t time.Time) tea.Msg {
|
||||
return TickMsg(t)
|
||||
})
|
||||
}
|
||||
|
||||
type Base struct {
|
||||
client *resty.Client
|
||||
}
|
||||
|
||||
func NewBase(client *resty.Client) *Base {
|
||||
return &Base{
|
||||
client: client,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user