Documentation
¶
Index ¶
- Constants
- Variables
- func GetAuthorizationURL(scopes []string) string
- type AfostoClient
- type File
- type FileClient
- func (c *FileClient) GetPublicSignature(ctx context.Context, dir string, method string) (string, error)
- func (c *FileClient) GetSignature(ctx context.Context, dir string, method string) (string, error)
- func (c *FileClient) GetSignedURL(ctx context.Context, fileID string) (string, error)
- func (c *FileClient) Upload(ctx context.Context, source io.ReadCloser, labelFilename string, ...) (*File, error)
- type Query
- type QueryError
- type QueryResult
- type Signature
Constants ¶
View Source
const ( BaseAuthorizationURL = "https://login.afosto.io/authorize" BaseApiUrl = "https://api.afosto.io" OauthClientID = "51403354ded11942d7195c66b9e81f71b74f56cd8adc539277823e179da8" RedirectURL = "http://localhost:8888/return" )
View Source
const (
FileServiceUrl = "https://api.afosto.io/cnt"
)
Variables ¶
View Source
var (
Jwt = ctxKey{Name: "jwt"}
)
Functions ¶
func GetAuthorizationURL ¶
Types ¶
type AfostoClient ¶
type AfostoClient struct {
// contains filtered or unexported fields
}
func GetClient ¶
func GetClient(tenantID string, accessToken string) *AfostoClient
func (*AfostoClient) Query ¶
func (ac *AfostoClient) Query(query string, parameters interface{}) (*QueryResult, error)
type File ¶ added in v0.0.15
type File struct {
ID string `json:"id"`
Filename string `json:"filename"`
Label string `json:"label"`
Dir string `json:"dir"`
Type string `json:"type"`
Mime string `json:"mime"`
Url string `json:"url"`
IsPublic bool `json:"is_public"`
IsListed bool `json:"is_listed"`
Metadata map[string]string `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type FileClient ¶ added in v0.0.15
type FileClient struct {
// contains filtered or unexported fields
}
func NewFileClient ¶ added in v0.0.15
func NewFileClient() *FileClient
func (*FileClient) GetPublicSignature ¶ added in v0.0.15
func (*FileClient) GetSignature ¶ added in v0.0.15
func (*FileClient) GetSignedURL ¶ added in v0.0.15
type QueryError ¶
type QueryResult ¶
type QueryResult struct {
Data map[string]interface{} `json:"data"`
Errors []QueryError `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.