This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 773
/
preheat_create_request.go
62 lines (50 loc) · 1.76 KB
/
preheat_create_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Code generated by go-swagger; DO NOT EDIT.
package types
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// PreheatCreateRequest Request option of creating a preheat task in supernode.
//
// swagger:model PreheatCreateRequest
type PreheatCreateRequest struct {
// URL may contains some changeful query parameters such as authentication parameters. Dragonfly will
// filter these parameter via 'filter'. The usage of it is that different URL may generate the same
// download taskID.
//
Filter string `json:"filter,omitempty"`
// If there is any authentication step of the remote server, the headers should contains authenticated information.
// Dragonfly will sent request taking the headers to remote server.
//
Headers map[string]string `json:"headers,omitempty"`
// This field is used for generating new downloading taskID to indetify different downloading task of remote URL.
//
Identifier string `json:"identifier,omitempty"`
// this must be image or file
//
Type string `json:"type,omitempty"`
// the image or file location
URL string `json:"url,omitempty"`
}
// Validate validates this preheat create request
func (m *PreheatCreateRequest) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *PreheatCreateRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *PreheatCreateRequest) UnmarshalBinary(b []byte) error {
var res PreheatCreateRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}