rest

package
v0.2.6-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2020 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec)

Types

type CommentRef

type CommentRef struct {
	ID           string  `json:"id"`
	RewardTarget string  `json:"reward_target"`
	RewardToken  string  `json:"reward_token"`
	RewardAmount string  `json:"reward_amount"`
	Attitudes    []int32 `json:"attitudes"`
}

type FollowupCommentReq

type FollowupCommentReq struct {
	BaseReq      rest.BaseReq `json:"base_req"`
	Token        string       `json:"token"`
	Donation     string       `json:"donation"`
	Title        string       `json:"title"`
	Content      string       `json:"content"`
	ContentType  int8         `json:"content_type"`
	IDRewarded   string       `json:"id_rewarded"`
	RewardTarget string       `json:"reward_target"`
	RewardToken  string       `json:"reward_token"`
	RewardAmount string       `json:"reward_amount"`
	Attitudes    []int32      `json:"attitudes"`
}

func (*FollowupCommentReq) GetBaseReq

func (req *FollowupCommentReq) GetBaseReq() *rest.BaseReq

func (*FollowupCommentReq) GetMsg

func (req *FollowupCommentReq) GetMsg(r *http.Request, sender sdk.AccAddress) (sdk.Msg, error)

func (*FollowupCommentReq) New

func (req *FollowupCommentReq) New() restutil.RestReq

type NewThreadReq

type NewThreadReq struct {
	BaseReq     rest.BaseReq `json:"base_req"`
	Token       string       `json:"token"`
	Donation    string       `json:"donation"`
	Title       string       `json:"title"`
	Content     string       `json:"content"`
	ContentType int8         `json:"content_type"`
}

func (*NewThreadReq) GetBaseReq

func (req *NewThreadReq) GetBaseReq() *rest.BaseReq

func (*NewThreadReq) GetMsg

func (req *NewThreadReq) GetMsg(r *http.Request, sender sdk.AccAddress) (sdk.Msg, error)

func (*NewThreadReq) New

func (req *NewThreadReq) New() restutil.RestReq

type RewardCommentsReq

type RewardCommentsReq struct {
	BaseReq    rest.BaseReq `json:"base_req"`
	Token      string       `json:"token"`
	References []CommentRef `json:"references"`
}

func (*RewardCommentsReq) GetBaseReq

func (req *RewardCommentsReq) GetBaseReq() *rest.BaseReq

func (*RewardCommentsReq) GetMsg

func (req *RewardCommentsReq) GetMsg(r *http.Request, sender sdk.AccAddress) (sdk.Msg, error)

func (*RewardCommentsReq) New

func (req *RewardCommentsReq) New() restutil.RestReq

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL