controller

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
}

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"`
	Proofs        []ProofQueryResponseSingleProof `json:"proofs"`
}

type ProofQueryResponseSingleProof

type ProofQueryResponseSingleProof struct {
	Platform      types.Platform `json:"platform"`
	Identity      string         `json:"identity"`
	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