Documentation
¶
Overview ¶
API Actor api for managing locations
Index ¶
- type ItemLocation
- type ListLocations
- func (ll ListLocations) FilterByID(id uint64) ListLocations
- func (ll ListLocations) FilterByName(name string) ListLocations
- func (ll ListLocations) FilterFunc(predicate func(ItemLocation) bool) ListLocations
- func (ll ListLocations) FindOne() ItemLocation
- func (ll ListLocations) Serialize(params ...string) (serialization.Serialized, error)
- type ListRequest
- type Locations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemLocation ¶
type ItemLocation struct { // Grid ID GID uint64 `json:"gid"` // ID ID uint64 `json:"id"` // GUID GUID uint64 `json:"guid"` // Location code LocationCode string `json:"locationCode"` // Name Name string `json:"name"` // Flag Flag string `json:"flag"` // Meta Meta []interface{} `json:"_meta"` // CKey CKey string `json:"_ckey"` }
Main information about locations
func (ItemLocation) Serialize ¶
func (il ItemLocation) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type ListLocations ¶
type ListLocations []ItemLocation
List of locations
func (ListLocations) FilterByID ¶
func (ll ListLocations) FilterByID(id uint64) ListLocations
FilterByID returns ListLocations with specified ID.
func (ListLocations) FilterByName ¶
func (ll ListLocations) FilterByName(name string) ListLocations
FilterByName returns ListLocations with specified Name.
func (ListLocations) FilterFunc ¶
func (ll ListLocations) FilterFunc(predicate func(ItemLocation) bool) ListLocations
FilterFunc allows filtering ListLocations based on a user-specified predicate.
func (ListLocations) FindOne ¶
func (ll ListLocations) FindOne() ItemLocation
FindOne returns first found ItemLocation If none was found, returns an empty struct.
func (ListLocations) Serialize ¶
func (ll ListLocations) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type ListRequest ¶
type ListRequest struct { // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list of locations
type Locations ¶
type Locations struct {
// contains filtered or unexported fields
}
Structure for creating request to locations
func (Locations) List ¶
func (l Locations) List(ctx context.Context, req ListRequest) (ListLocations, error)
List gets list all locations