-
Notifications
You must be signed in to change notification settings - Fork 9
/
operation.go
59 lines (44 loc) · 1.51 KB
/
operation.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
package types
// Operation to do on the engine with an object. Users are expected to compare values
// of this type to the Operation(Get|Create|...) constants in this package.
type Operation string
const (
// OperationGet is used to retrieve the given identified object from the engine.
OperationGet Operation = "Get"
// OperationCreate is used to create the given object on the engine.
OperationCreate Operation = "Create"
// OperationUpdate is used to update the given identified object on the engine with the newly given data.
OperationUpdate Operation = "Update"
// OperationDestroy is used to destroy the identified object from the engine.
OperationDestroy Operation = "Destroy"
// OperationList is used to retrieve objects with attributes matching the ones in the given object from
// the engine.
OperationList Operation = "List"
)
// GetOptions contains options valid for Get operations.
type GetOptions struct {
commonOptions
}
// ListOptions contains options valid for List operations.
type ListOptions struct {
commonOptions
ObjectChannel *ObjectChannel
Paged bool
Page uint
EntriesPerPage uint
PageInfo *PageInfo
FullObjects bool
}
// CreateOptions contains options valid for Create operations.
type CreateOptions struct {
commonOptions
AutoTags []string
}
// UpdateOptions contains options valid for Update operations.
type UpdateOptions struct {
commonOptions
}
// DestroyOptions contains options valid for Destroy operations.
type DestroyOptions struct {
commonOptions
}