Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // ClientID is the application's ID. ClientID string // ClientSecret is the application's secret. ClientSecret string // OidcProviderURL is the OpenID Connect Provider's // URL. This is a constant specific to each server. OidcProviderURL string // StorageApiURL is the Storage API's URL. StorageApiURL string }
type DeleteResponse ¶
type DeleteResponse struct { FileID string `json:"file_id"` Info FileInfo `json:"info"` Message string `json:"message,omitempty"` Status responseStatus `json:"status"` }
func (DeleteResponse) IsOk ¶
func (u DeleteResponse) IsOk() bool
type GetResponse ¶
type GetResponse struct { Data string `json:"data"` Info FileInfo `json:"info"` Message string `json:"message,omitempty"` Status responseStatus `json:"status"` }
func (GetResponse) IsOk ¶
func (u GetResponse) IsOk() bool
type StorageApi ¶
type StorageApi struct {
// contains filtered or unexported fields
}
func NewStorageApi ¶
func NewStorageApi(ctx context.Context, config Config) (*StorageApi, error)
func (*StorageApi) Delete ¶
func (s *StorageApi) Delete(ctx context.Context, fileId string) (DeleteResponse, error)
func (*StorageApi) Get ¶
func (s *StorageApi) Get(ctx context.Context, fileId string) (GetResponse, error)
func (*StorageApi) Upload ¶
func (s *StorageApi) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (UploadResponse, error)
type UploadBody ¶
type UploadResponse ¶
type UploadResponse struct { FileID string `json:"file_id"` Info FileInfo `json:"info"` Message string `json:"message,omitempty"` Status responseStatus `json:"status"` }
func (UploadResponse) IsOk ¶
func (u UploadResponse) IsOk() bool
Click to show internal directories.
Click to hide internal directories.