24 lines
365 B
Go
24 lines
365 B
Go
package stages
|
|
|
|
import (
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
"github.com/go-resty/resty/v2"
|
|
)
|
|
|
|
type BaseModel struct {
|
|
queue *[]*tea.Program
|
|
client *resty.Client
|
|
}
|
|
|
|
func NewBaseModel(
|
|
queue *[]*tea.Program,
|
|
endpoint string,
|
|
) *BaseModel {
|
|
return &BaseModel{
|
|
queue: queue,
|
|
client: resty.New().
|
|
SetBaseURL(endpoint).
|
|
SetDisableWarn(true),
|
|
}
|
|
}
|