github.com/vmware/transport-go@v1.3.4/model/store_responses.go (about) 1 // Copyright 2019-2020 VMware, Inc. 2 // SPDX-License-Identifier: BSD-2-Clause 3 4 package model 5 6 type StoreContentResponse struct { 7 Items map[string]interface{} `json:"items"` 8 ResponseType string `json:"responseType"` // should be "storeContentResponse" 9 StoreId string `json:"storeId"` 10 StoreVersion int64 `json:"storeVersion"` 11 } 12 13 func NewStoreContentResponse( 14 storeId string, items map[string]interface{}, storeVersion int64) *StoreContentResponse { 15 16 return &StoreContentResponse{ 17 ResponseType: "storeContentResponse", 18 StoreId: storeId, 19 Items: items, 20 StoreVersion: storeVersion, 21 } 22 } 23 24 type UpdateStoreResponse struct { 25 ItemId string `json:"itemId"` 26 NewItemValue interface{} `json:"newItemValue"` 27 ResponseType string `json:"responseType"` // should be "updateStoreResponse" 28 StoreId string `json:"storeId"` 29 StoreVersion int64 `json:"storeVersion"` 30 } 31 32 func NewUpdateStoreResponse( 33 storeId string, itemId string, newValue interface{}, storeVersion int64) *UpdateStoreResponse { 34 35 return &UpdateStoreResponse{ 36 ResponseType: "updateStoreResponse", 37 StoreId: storeId, 38 StoreVersion: storeVersion, 39 ItemId: itemId, 40 NewItemValue: newValue, 41 } 42 }