controller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PER_PAGE = 20
)

Variables

View Source
var (
	Engine *gin.Engine
)

Functions

func Init

func Init()

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type ProofChainPaginationResponse

type ProofChainPaginationResponse struct {
	Total   int64 `json:"total"`
	Per     int   `json:"per"`
	Current int   `json:"current"`
	Next    int   `json:"next"`
}

type ProofChainRequest

type ProofChainRequest struct {
	PersonaPubkeyHex string `form:"public_key"`
	Page             int    `form:"page"`
}

type ProofChainResponse

type ProofChainResponse struct {
	Pagination  ProofChainPaginationResponse `json:"pagination"`
	ProofChains []model.ProofChainItem       `json:"proof_chain"`
}

type ProofChainSingleItem

type ProofChainSingleItem struct {
	model.ProofChainItem
	Avatar string `json:"avatar"`
	ID     int64  `json:"id"`
}

type ProofChainSingleRequest

type ProofChainSingleRequest struct {
	LastID int `form:"last_id"`
	Count  int `form:"count"`
}

type ProofChainSingleResponse

type ProofChainSingleResponse struct {
	Links []ProofChainSingleItem `json:"links"`
}

type ProofExistsRequest

type ProofExistsRequest struct {
	Platform         string `form:"platform"`
	Identity         string `form:"identity"`
	PersonaPubkeyHex string `form:"public_key"`
}

type ProofExistsResponse

type ProofExistsResponse struct {
	CreatedAt     string `json:"created_at"`
	LastCheckedAt string `json:"last_checked_at"`
	IsValid       bool   `json:"is_valid"`
	InvalidReason string `json:"invalid_reason"`
}

type ProofPayloadRequest

type ProofPayloadRequest struct {
	Action    types.Action             `json:"action"`
	Platform  types.Platform           `json:"platform"`
	Identity  string                   `json:"identity"`
	PublicKey string                   `json:"public_key"`
	Extra     ProofPayloadRequestExtra `json:"extra"`
}

type ProofPayloadRequestExtra

type ProofPayloadRequestExtra struct {
	EthereumWalletSignature string `json:"wallet_signature"`
}

type ProofPayloadResponse

type ProofPayloadResponse struct {
	PostContent map[string]string `json:"post_content"`
	SignPayload string            `json:"sign_payload"`
	Uuid        string            `json:"uuid"`
	CreatedAt   string            `json:"created_at"`
}

type ProofQueryPaginationResponse

type ProofQueryPaginationResponse struct {
	Total   int64 `json:"total"`
	Per     int   `json:"per"`
	Current int   `json:"current"`
	Next    int   `json:"next"`
}

type ProofQueryRequest

type ProofQueryRequest struct {
	Platform   string   `form:"platform"`
	Identity   []string `form:"identity"`
	Page       int      `form:"page"`
	ExactMatch bool     `form:"exact"`
	SortBy     string   `form:"sort"`
	Order      string   `form:"order"`
}

type ProofQueryResponse

type ProofQueryResponse struct {
	Pagination ProofQueryPaginationResponse `json:"pagination"`
	IDs        []ProofQueryResponseSingle   `json:"ids"`
}

type ProofQueryResponseSingle

type ProofQueryResponseSingle struct {
	Persona       string                          `json:"persona"`
	Avatar        string                          `json:"avatar"`
	LastArweaveID string                          `json:"last_arweave_id"`
	ActivatedAt   string                          `json:"activated_at"`
	Proofs        []ProofQueryResponseSingleProof `json:"proofs"`
}

type ProofQueryResponseSingleProof

type ProofQueryResponseSingleProof struct {
	Platform      types.Platform `json:"platform"`
	Identity      string         `json:"identity"`
	AltID         string         `json:"alt_id"`
	CreatedAt     string         `json:"created_at"`
	LastCheckedAt string         `json:"last_checked_at"`
	IsValid       bool           `json:"is_valid"`
	InvalidReason string         `json:"invalid_reason"`
}

type ProofUploadRequest

type ProofUploadRequest struct {
	Action        types.Action            `json:"action"`
	Platform      types.Platform          `json:"platform"`
	Identity      string                  `json:"identity"`
	ProofLocation string                  `json:"proof_location"`
	PublicKey     string                  `json:"public_key"`
	Uuid          string                  `json:"uuid"`
	CreatedAt     string                  `json:"created_at"`
	Extra         ProofUploadRequestExtra `json:"extra"`
}

type ProofUploadRequestExtra

type ProofUploadRequestExtra struct {
	Signature               string `json:"signature"`
	EthereumWalletSignature string `json:"wallet_signature"`
}

Jump to

Keyboard shortcuts

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