Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type ApiCreateMedia
- type ApiFileFormat
- type ApiHealthCheckResponse
- type ApiMediasMetadata
- type ApiUpdateMedia
- type AttachmentsApiService
- func (a *AttachmentsApiService) AddMediaAttachment(ctx context.Context, mediaId string, key string, file *os.File) (UtilDataResponse, *http.Response, error)
- func (a *AttachmentsApiService) DeleteMediaAttachment(ctx context.Context, mediaId string, key string) (UtilDataResponse, *http.Response, error)
- func (a *AttachmentsApiService) GetMediaAttachments(ctx context.Context, mediaId string) (UtilDataResponse, *http.Response, error)
- type BasicAuth
- type Configuration
- type DialectDriver
- type EntMedia
- type EntMediaEdges
- type EntMediaFile
- type EntMediaFileEdges
- type EntVideo
- type GenericSwaggerError
- type HealthApiService
- type HttputilsDataResponse
- type HttputilsErrorResponse
- type InlineResponse200
- type InlineResponse2001
- type InlineResponse2002
- type InlineResponse2003
- type InstanceApiService
- type MediasApiGetAllMediasOpts
- type MediasApiService
- func (a *MediasApiService) CreateMedia(ctx context.Context, media ApiCreateMedia) (InlineResponse2002, *http.Response, error)
- func (a *MediasApiService) DeleteMedia(ctx context.Context, id string) (UtilDataResponse, *http.Response, error)
- func (a *MediasApiService) GetAllMedias(ctx context.Context, localVarOptionals *MediasApiGetAllMediasOpts) (InlineResponse2001, *http.Response, error)
- func (a *MediasApiService) GetMedia(ctx context.Context, id string) (InlineResponse2002, *http.Response, error)
- func (a *MediasApiService) UpdateMedia(ctx context.Context, id string, media ApiUpdateMedia) (InlineResponse2002, *http.Response, error)
- func (a *MediasApiService) UploadAudio(ctx context.Context, id string, file *os.File) (InlineResponse2003, *http.Response, error)
- func (a *MediasApiService) UploadVideo(ctx context.Context, id string, file *os.File) (InlineResponse2003, *http.Response, error)
- type StreamApiService
- type UtilDataResponse
- type UtilErrorResponse
- type VideosApiService
- func (a *VideosApiService) V1VideosGet(ctx context.Context, localVarOptionals *VideosApiV1VideosGetOpts) (InlineResponse200, *http.Response, error)
- func (a *VideosApiService) V1VideosIdDelete(ctx context.Context, id string) (HttputilsDataResponse, *http.Response, error)
- func (a *VideosApiService) V1VideosIdGet(ctx context.Context, id string) (InlineResponse2001, *http.Response, error)
- func (a *VideosApiService) V1VideosIdPatch(ctx context.Context, id string, title string) (InlineResponse2001, *http.Response, error)
- func (a *VideosApiService) V1VideosIdUploadPost(ctx context.Context, id string, file *os.File) (InlineResponse2001, *http.Response, error)
- func (a *VideosApiService) V1VideosPost(ctx context.Context, title string) (InlineResponse2001, *http.Response, error)
- type VideosApiV1VideosGetOpts
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct {
AttachmentsApi *AttachmentsApiService
InstanceApi *InstanceApiService
MediasApi *MediasApiService
StreamApi *StreamApiService
// contains filtered or unexported fields
}
APIClient manages communication with the Gilfoyle server API vv1 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
// Operation is the name of the swagger operation.
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
Payload []byte `json:"-"`
}
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type ApiCreateMedia ¶
type ApiCreateMedia struct {
Title string `json:"title"`
}
type ApiFileFormat ¶
type ApiFileFormat struct {
BitRate string `json:"bit_rate,omitempty"`
Duration string `json:"duration,omitempty"`
Filename string `json:"filename,omitempty"`
FormatLongName string `json:"format_long_name,omitempty"`
FormatName string `json:"format_name,omitempty"`
NbPrograms int32 `json:"nb_programs,omitempty"`
NbStreams int32 `json:"nb_streams,omitempty"`
ProbeScore int32 `json:"probe_score,omitempty"`
Size string `json:"size,omitempty"`
StartTime string `json:"start_time,omitempty"`
}
type ApiHealthCheckResponse ¶
type ApiHealthCheckResponse struct {
Commit string `json:"commit,omitempty"`
DatabaseDialect string `json:"database_dialect,omitempty"`
Debug bool `json:"debug,omitempty"`
MaxFileSize int32 `json:"max_file_size,omitempty"`
StorageDriver string `json:"storage_driver,omitempty"`
Tag string `json:"tag,omitempty"`
}
type ApiMediasMetadata ¶
type ApiUpdateMedia ¶
type ApiUpdateMedia struct {
Title string `json:"title"`
}
type AttachmentsApiService ¶
type AttachmentsApiService service
func (*AttachmentsApiService) AddMediaAttachment ¶
func (a *AttachmentsApiService) AddMediaAttachment(ctx context.Context, mediaId string, key string, file *os.File) (UtilDataResponse, *http.Response, error)
AttachmentsApiService Add attachment to a media Add attachment to a media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mediaId Media identifier
- @param key Attachment unique identifier
- @param file Attachment file
@return UtilDataResponse
func (*AttachmentsApiService) DeleteMediaAttachment ¶
func (a *AttachmentsApiService) DeleteMediaAttachment(ctx context.Context, mediaId string, key string) (UtilDataResponse, *http.Response, error)
AttachmentsApiService Delete attachment of a media Delete attachment of a media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mediaId Media identifier
- @param key Attachment unique identifier
@return UtilDataResponse
func (*AttachmentsApiService) GetMediaAttachments ¶
func (a *AttachmentsApiService) GetMediaAttachments(ctx context.Context, mediaId string) (UtilDataResponse, *http.Response, error)
AttachmentsApiService Get attachments of a media Get attachments of a media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mediaId Media identifier
@return UtilDataResponse
type BasicAuth ¶
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client
}
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DialectDriver ¶
type DialectDriver struct {
}
type EntMedia ¶
type EntMedia struct {
// CreatedAt holds the value of the \"created_at\" field.
CreatedAt string `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph. The values are being populated by the MediaQuery when eager-loading is set.
Edges *EntMediaEdges `json:"edges,omitempty"`
// ID of the ent.
Id string `json:"id,omitempty"`
// OriginalFilename holds the value of the \"original_filename\" field.
OriginalFilename string `json:"original_filename,omitempty"`
// Status holds the value of the \"status\" field.
Status string `json:"status,omitempty"`
// Title holds the value of the \"title\" field.
Title string `json:"title,omitempty"`
// UpdatedAt holds the value of the \"updated_at\" field.
UpdatedAt string `json:"updated_at,omitempty"`
}
type EntMediaEdges ¶
type EntMediaEdges struct {
// MediaFiles holds the value of the media_files edge.
MediaFiles []EntMediaFile `json:"media_files,omitempty"`
}
type EntMediaFile ¶
type EntMediaFile struct {
// CreatedAt holds the value of the \"created_at\" field.
CreatedAt string `json:"created_at,omitempty"`
// DurationSeconds holds the value of the \"duration_seconds\" field.
DurationSeconds float32 `json:"duration_seconds,omitempty"`
// Edges holds the relations/edges for other nodes in the graph. The values are being populated by the MediaFileQuery when eager-loading is set.
Edges *EntMediaFileEdges `json:"edges,omitempty"`
// Format holds the value of the \"format\" field.
Format string `json:"format,omitempty"`
// Framerate holds the value of the \"framerate\" field.
Framerate int32 `json:"framerate,omitempty"`
// ID of the ent.
Id string `json:"id,omitempty"`
// MediaType holds the value of the \"media_type\" field.
MediaType string `json:"media_type,omitempty"`
// RenditionName holds the value of the \"rendition_name\" field.
RenditionName string `json:"rendition_name,omitempty"`
// ResolutionHeight holds the value of the \"resolution_height\" field.
ResolutionHeight int32 `json:"resolution_height,omitempty"`
// ResolutionWidth holds the value of the \"resolution_width\" field.
ResolutionWidth int32 `json:"resolution_width,omitempty"`
// TargetBandwidth holds the value of the \"target_bandwidth\" field.
TargetBandwidth int32 `json:"target_bandwidth,omitempty"`
// UpdatedAt holds the value of the \"updated_at\" field.
UpdatedAt string `json:"updated_at,omitempty"`
// VideoBitrate holds the value of the \"video_bitrate\" field.
VideoBitrate int32 `json:"video_bitrate,omitempty"`
}
type EntMediaFileEdges ¶
type EntMediaFileEdges struct {
// Media holds the value of the media edge.
Media *EntMedia `json:"media,omitempty"`
}
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type HealthApiService ¶
type HealthApiService service
func (*HealthApiService) CheckHealth ¶
func (a *HealthApiService) CheckHealth(ctx context.Context) (InlineResponse200, *http.Response, error)
HealthApiService Check service status Check for the health of the service
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return InlineResponse200
type HttputilsDataResponse ¶
type HttputilsDataResponse struct {
Code int32 `json:"code,omitempty"`
Data *interface{} `json:"data,omitempty"`
}
type HttputilsErrorResponse ¶
type InlineResponse200 ¶
type InlineResponse200 struct {
Data *ApiHealthCheckResponse `json:"data,omitempty"`
UtilDataResponse *UtilDataResponse `json:"util.DataResponse,omitempty"`
}
type InlineResponse2001 ¶
type InlineResponse2001 struct {
Data []EntMedia `json:"data,omitempty"`
Metadata *ApiMediasMetadata `json:"metadata,omitempty"`
UtilDataResponse *UtilDataResponse `json:"util.DataResponse,omitempty"`
}
type InlineResponse2002 ¶
type InlineResponse2002 struct {
Data *EntMedia `json:"data,omitempty"`
UtilDataResponse *UtilDataResponse `json:"util.DataResponse,omitempty"`
}
type InlineResponse2003 ¶
type InlineResponse2003 struct {
Data *ApiFileFormat `json:"data,omitempty"`
UtilDataResponse *UtilDataResponse `json:"util.DataResponse,omitempty"`
}
type InstanceApiService ¶
type InstanceApiService service
func (*InstanceApiService) CheckHealth ¶
func (a *InstanceApiService) CheckHealth(ctx context.Context) (InlineResponse200, *http.Response, error)
InstanceApiService Check service status Check for the health of the service
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return InlineResponse200
type MediasApiService ¶
type MediasApiService service
func (*MediasApiService) CreateMedia ¶
func (a *MediasApiService) CreateMedia(ctx context.Context, media ApiCreateMedia) (InlineResponse2002, *http.Response, error)
MediasApiService Create a media Create a new media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param media Media data
@return InlineResponse2002
func (*MediasApiService) DeleteMedia ¶
func (a *MediasApiService) DeleteMedia(ctx context.Context, id string) (UtilDataResponse, *http.Response, error)
MediasApiService Delete a media Delete one media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Media ID
@return UtilDataResponse
func (*MediasApiService) GetAllMedias ¶
func (a *MediasApiService) GetAllMedias(ctx context.Context, localVarOptionals *MediasApiGetAllMediasOpts) (InlineResponse2001, *http.Response, error)
func (*MediasApiService) GetMedia ¶
func (a *MediasApiService) GetMedia(ctx context.Context, id string) (InlineResponse2002, *http.Response, error)
MediasApiService Get a media Get one media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Media ID
@return InlineResponse2002
func (*MediasApiService) UpdateMedia ¶
func (a *MediasApiService) UpdateMedia(ctx context.Context, id string, media ApiUpdateMedia) (InlineResponse2002, *http.Response, error)
MediasApiService Update a media Update an existing media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Media ID
- @param media Media data
@return InlineResponse2002
func (*MediasApiService) UploadAudio ¶
func (a *MediasApiService) UploadAudio(ctx context.Context, id string, file *os.File) (InlineResponse2003, *http.Response, error)
MediasApiService Upload a audio file Upload a new audio file for a given media ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Media identifier
- @param file Audio file
@return InlineResponse2003
func (*MediasApiService) UploadVideo ¶
func (a *MediasApiService) UploadVideo(ctx context.Context, id string, file *os.File) (InlineResponse2003, *http.Response, error)
MediasApiService Upload a video file Upload a new video file for a given media ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Media identifier
- @param file Video file
@return InlineResponse2003
type StreamApiService ¶
type StreamApiService service
func (*StreamApiService) GetMediaPlaylistFile ¶
func (a *StreamApiService) GetMediaPlaylistFile(ctx context.Context, mediaId string, filename string) (string, *http.Response, error)
StreamApiService Get HLS playlist file of a media Get HLS playlist file of a media
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mediaId Media identifier
- @param filename HLS filename
@return string
type UtilDataResponse ¶
type UtilDataResponse struct {
Code int32 `json:"code,omitempty"`
Data *interface{} `json:"data,omitempty"`
Metadata *interface{} `json:"metadata,omitempty"`
}
type UtilErrorResponse ¶
type VideosApiService ¶
type VideosApiService service
func (*VideosApiService) V1VideosGet ¶
func (a *VideosApiService) V1VideosGet(ctx context.Context, localVarOptionals *VideosApiV1VideosGetOpts) (InlineResponse200, *http.Response, error)
func (*VideosApiService) V1VideosIdDelete ¶
func (a *VideosApiService) V1VideosIdDelete(ctx context.Context, id string) (HttputilsDataResponse, *http.Response, error)
VideosApiService Delete a video Delete one video
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Video ID
@return HttputilsDataResponse
func (*VideosApiService) V1VideosIdGet ¶
func (a *VideosApiService) V1VideosIdGet(ctx context.Context, id string) (InlineResponse2001, *http.Response, error)
VideosApiService Get a video get one video
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Video ID
@return InlineResponse2001
func (*VideosApiService) V1VideosIdPatch ¶
func (a *VideosApiService) V1VideosIdPatch(ctx context.Context, id string, title string) (InlineResponse2001, *http.Response, error)
VideosApiService Update a video Update an existing video
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Video ID
- @param title Video title
@return InlineResponse2001
func (*VideosApiService) V1VideosIdUploadPost ¶
func (a *VideosApiService) V1VideosIdUploadPost(ctx context.Context, id string, file *os.File) (InlineResponse2001, *http.Response, error)
VideosApiService Upload a video file Upload a new video file for a given video ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id Video ID
- @param file Video file
@return InlineResponse2001
func (*VideosApiService) V1VideosPost ¶
func (a *VideosApiService) V1VideosPost(ctx context.Context, title string) (InlineResponse2001, *http.Response, error)
VideosApiService Create a video Create a new video
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param title Video title
@return InlineResponse2001
Source Files
¶
- api_attachments.go
- api_health.go
- api_instance.go
- api_medias.go
- api_stream.go
- api_videos.go
- client.go
- configuration.go
- model_api_create_media.go
- model_api_file_format.go
- model_api_health_check_response.go
- model_api_medias_metadata.go
- model_api_update_media.go
- model_dialect_driver.go
- model_ent_media.go
- model_ent_media_edges.go
- model_ent_media_file.go
- model_ent_media_file_edges.go
- model_ent_video.go
- model_httputils_data_response.go
- model_httputils_error_response.go
- model_inline_response_200.go
- model_inline_response_200_1.go
- model_inline_response_200_2.go
- model_inline_response_200_3.go
- model_util_data_response.go
- model_util_error_response.go
- response.go