20 lines
637 B
Go
20 lines
637 B
Go
package models
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// ClientInterface defines the minimal client interface needed by models
|
|
type ClientInterface interface {
|
|
GetRequest() RequestInterface
|
|
}
|
|
|
|
// RequestInterface defines the minimal request interface needed by models
|
|
type RequestInterface interface {
|
|
Get(ctx context.Context, path string, params map[string]string, result any) error
|
|
Post(ctx context.Context, path string, body any, result any) error
|
|
Put(ctx context.Context, path string, body any, result any) error
|
|
Delete(ctx context.Context, path string, body any, result any) error
|
|
Download(ctx context.Context, url string) ([]byte, error)
|
|
}
|