Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
type IService interface { // 預覽交換後的資源(獎勵) DataRequest(req *ResourceDataRequest, trace ...tracehandler.Trace) (*ResourceDataResponse, error) // 等價資源 : 請server 派發resources要等價交換的獎勵給玩家 OperateRequest(req *ResourceOperateRequest, trace ...tracehandler.Trace) (*ResourceOperateResponse, error) }
type IServiceExt ¶
type IServiceExt interface { // 預覽單個但不執行交換後的資源(獎勵) Preview(memberID string, resourceReward reward.Nodes, trace ...tracehandler.Trace) (*PreviewInfo, error) // 預覽多個但不執行交換後的資源(獎勵) MultiPreview(memberID string, resources ResourcePreviewInfos, trace ...tracehandler.Trace) (*PreviewInfos, error) // 透過交換服務去派獎給玩家 IncreaseResource(memberID, source, description string, resourceReward reward.Nodes, trace ...tracehandler.Trace) error }
func NewExt ¶
func NewExt(service IService) IServiceExt
type PreviewInfo ¶
type PreviewInfos ¶
type PreviewInfos []PreviewInfo
type ResourceDataRequest ¶
type ResourceDataRequest struct { Action Action `json:"action"` MemberId string `json:"memberId"` ResourcePreviewInfos ResourcePreviewInfos `json:"resourcePreviewInfos"` }
type ResourceDataResponse ¶
type ResourceDataResponse struct { RetStatus baseProtocol.RetStatus `json:"retStatus"` PreviewInfos PreviewInfos `json:"previewInfos"` }
type ResourceOperateRequest ¶
type ResourceOperateResponse ¶
type ResourceOperateResponse struct {
RetStatus baseProtocol.RetStatus `json:"retStatus"`
}
type ResourcePreviewInfo ¶
type ResourcePreviewInfos ¶
type ResourcePreviewInfos []ResourcePreviewInfo
Click to show internal directories.
Click to hide internal directories.