Documentation ¶
Index ¶
- Variables
- type BigMapItem
- type BigMapResponseItem
- type CodeDiff
- type Context
- func (ctx *Context) AuthJWTRequired() gin.HandlerFunc
- func (ctx *Context) CreateSubscription(c *gin.Context)
- func (ctx *Context) DeleteSubscription(c *gin.Context)
- func (ctx *Context) GetBigMap(c *gin.Context)
- func (ctx *Context) GetBigMapByKeyHash(c *gin.Context)
- func (ctx *Context) GetContract(c *gin.Context)
- func (ctx *Context) GetContractCode(c *gin.Context)
- func (ctx *Context) GetContractOperations(c *gin.Context)
- func (ctx *Context) GetContractRating(c *gin.Context)
- func (ctx *Context) GetContractStorage(c *gin.Context)
- func (ctx *Context) GetDiff(c *gin.Context)
- func (ctx *Context) GetEntrypoints(c *gin.Context)
- func (ctx *Context) GetMempool(c *gin.Context)
- func (ctx *Context) GetMigrationDiff(c *gin.Context)
- func (ctx *Context) GetOperation(c *gin.Context)
- func (ctx *Context) GetProjects(c *gin.Context)
- func (ctx *Context) GetRandomContract(c *gin.Context)
- func (ctx *Context) GetSameContracts(c *gin.Context)
- func (ctx *Context) GetSimilarContracts(c *gin.Context)
- func (ctx *Context) GetUserProfile(c *gin.Context)
- func (ctx *Context) IsAuthenticated() gin.HandlerFunc
- func (ctx *Context) ListSubscriptions(c *gin.Context)
- func (ctx *Context) OauthCallback(c *gin.Context)
- func (ctx *Context) OauthLogin(c *gin.Context)
- func (ctx *Context) Recommendations(c *gin.Context)
- func (ctx *Context) Search(c *gin.Context)
- func (ctx *Context) SetAlias(c *gin.Context)
- func (ctx *Context) Vote(c *gin.Context)
- type Contract
- type OPGRequest
- type OauthParams
- type OauthRequest
- type Operation
- type OperationResponse
- type ProfileInfo
- type Subscription
- type TimelineItem
Constants ¶
This section is empty.
Variables ¶
View Source
var AddressValidator validator.Func = func(fl validator.FieldLevel) bool { address := fl.Field().String() if !strings.HasPrefix(address, "KT") && !strings.HasPrefix(address, "tz") && len(address) != 36 { return false } _, _, err := base58.CheckDecode(address) return err == nil }
AddressValidator -
View Source
var NetworkValidator validator.Func = func(fl validator.FieldLevel) bool { network := fl.Field().String() return helpers.StringInArray(network, []string{ consts.Mainnet, consts.Babylon, consts.Carthage, consts.Zeronet, }) }
NetworkValidator -
View Source
var OPGValidator validator.Func = func(fl validator.FieldLevel) bool { hash := fl.Field().String() if !strings.HasPrefix(hash, "o") && len(hash) != 51 { return false } _, _, err := base58.CheckDecode(hash) return err == nil }
OPGValidator -
View Source
var StatusValidator validator.Func = func(fl validator.FieldLevel) bool { status := fl.Field().String() data := strings.Split(status, ",") for i := range data { if !helpers.StringInArray(data[i], []string{ consts.Applied, consts.Backtracked, consts.Failed, consts.Skipped, }) { return false } } return true }
StatusValidator -
Functions ¶
This section is empty.
Types ¶
type BigMapItem ¶
type BigMapItem struct { Key interface{} `json:"key"` Value interface{} `json:"value"` KeyHash string `json:"key_hash"` Level int64 `json:"level"` }
BigMapItem -
type BigMapResponseItem ¶
type BigMapResponseItem struct { Item BigMapItem `json:"data"` Count int64 `json:"count"` }
BigMapResponseItem -
type CodeDiff ¶
type CodeDiff struct { Full string `json:"full,omitempty"` Added int64 `json:"added,omitempty"` Removed int64 `json:"removed,omitempty"` }
CodeDiff -
type Context ¶
type Context struct { ES *elastic.Elastic RPCs map[string]noderpc.Pool Dir string DB database.DB OAUTH oauth.Config }
Context -
func NewContext ¶
func NewContext(e *elastic.Elastic, rpcs map[string]noderpc.Pool, dir string, db database.DB, oauth oauth.Config) *Context
NewContext -
func (*Context) AuthJWTRequired ¶
func (ctx *Context) AuthJWTRequired() gin.HandlerFunc
AuthJWTRequired -
func (*Context) CreateSubscription ¶
CreateSubscription -
func (*Context) DeleteSubscription ¶
DeleteSubscription -
func (*Context) GetBigMapByKeyHash ¶
GetBigMapByKeyHash -
func (*Context) GetContractCode ¶
GetContractCode -
func (*Context) GetContractOperations ¶
GetContractOperations -
func (*Context) GetContractRating ¶
GetContractRating -
func (*Context) GetContractStorage ¶
GetContractStorage -
func (*Context) GetEntrypoints ¶
GetEntrypoints -
func (*Context) GetMigrationDiff ¶
GetMigrationDiff -
func (*Context) GetRandomContract ¶
GetRandomContract -
func (*Context) GetSameContracts ¶
GetSameContracts -
func (*Context) GetSimilarContracts ¶
GetSimilarContracts -
func (*Context) GetUserProfile ¶
GetUserProfile -
func (*Context) IsAuthenticated ¶
func (ctx *Context) IsAuthenticated() gin.HandlerFunc
IsAuthenticated -
func (*Context) ListSubscriptions ¶
ListSubscriptions -
func (*Context) Recommendations ¶
Recommendations -
type Contract ¶
type Contract struct { *models.Contract Profile *ProfileInfo `json:"profile,omitempty"` }
Contract -
type OPGRequest ¶
type OPGRequest struct {
Hash string `uri:"hash" binding:"required,opg"`
}
OPGRequest -
type OauthRequest ¶
OauthRequest -
type Operation ¶
type Operation struct { ID string `json:"-"` Protocol string `json:"protocol"` Hash string `json:"hash"` Internal bool `json:"internal"` Network string `json:"network"` Timesatmp time.Time `json:"timestamp"` Level int64 `json:"level"` Kind string `json:"kind"` Source string `json:"source"` Fee int64 `json:"fee,omitempty"` Counter int64 `json:"counter,omitempty"` GasLimit int64 `json:"gas_limit,omitempty"` StorageLimit int64 `json:"storage_limit,omitempty"` Amount int64 `json:"amount,omitempty"` Destination string `json:"destination,omitempty"` PublicKey string `json:"public_key,omitempty"` ManagerPubKey string `json:"manager_pubkey,omitempty"` Balance int64 `json:"balance,omitempty"` Delegate string `json:"delegate,omitempty"` Status string `json:"status"` Entrypoint string `json:"entrypoint,omitempty"` Errors []cerrors.Error `json:"errors,omitempty"` BalanceUpdates []models.BalanceUpdate `json:"balance_updates,omitempty"` Result *models.OperationResult `json:"result,omitempty"` Parameters interface{} `json:"parameters,omitempty"` StorageDiff interface{} `json:"storage_diff,omitempty"` Mempool bool `json:"mempool"` }
Operation -
type OperationResponse ¶
type OperationResponse struct { Operations []Operation `json:"operations"` LastID string `json:"last_id"` }
OperationResponse -
type Subscription ¶
Subscription -
type TimelineItem ¶
TimelineItem -
Click to show internal directories.
Click to hide internal directories.