decentralized

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountActivitiesRequest

type AccountActivitiesRequest struct {
	Account        string            `param:"account" validate:"required"`
	Limit          int               `query:"limit" validate:"min=1,max=100" default:"100"`
	ActionLimit    int               `query:"action_limit" validate:"min=1,max=20" default:"10"`
	Cursor         *string           `query:"cursor"`
	SinceTimestamp *uint64           `query:"since_timestamp"`
	UntilTimestamp *uint64           `query:"until_timestamp"`
	Status         *bool             `query:"success"`
	Direction      *filter.Direction `query:"direction"`
	Network        []filter.Network  `query:"network"`
	Tag            []filter.Tag      `query:"tag"`
	Type           []filter.Type     `query:"-"`
	Platform       []filter.Platform `query:"platform"`
}

type ActivitiesResponse

type ActivitiesResponse struct {
	Data []*schema.Feed `json:"data"`
	Meta *MetaCursor    `json:"meta,omitempty"`
}

type ActivityRequest

type ActivityRequest struct {
	ID          string `param:"id"`
	ActionLimit int    `query:"action_limit"  validate:"min=1,max=20" default:"10"`
	ActionPage  int    `query:"action_page" validate:"min=1" default:"1"`
}

type ActivityResponse

type ActivityResponse struct {
	Data *schema.Feed    `json:"data"`
	Meta *MetaTotalPages `json:"meta"`
}

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(_ context.Context, databaseClient database.Client) *Hub

NewHub creates a new decentralized hub

func (*Hub) GetAccountActivities

func (h *Hub) GetAccountActivities(c echo.Context) (err error)

func (*Hub) GetActivitiesCount

func (h *Hub) GetActivitiesCount(c echo.Context) error

func (*Hub) GetActivity

func (h *Hub) GetActivity(c echo.Context) error

type MetaCursor

type MetaCursor struct {
	Cursor string `json:"cursor"`
}

type MetaTotalPages

type MetaTotalPages struct {
	TotalPages int `json:"totalPages"`
}

type StatisticResponse

type StatisticResponse struct {
	Count      int64      `json:"count"`
	LastUpdate *time.Time `json:"last_update,omitempty"`
}

Jump to

Keyboard shortcuts

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