Documentation
¶
Index ¶
- Constants
- Variables
- func GetRecentRequest() []string
- func NewComponent(_ context.Context, apiServer *echo.Echo, config *config.File, ...) component.Component
- type AccountActivitiesRequest
- type AccountsActivitiesRequest
- type ActivitiesResponse
- type ActivityRequest
- type ActivityResponse
- type Component
- func (c *Component) BatchGetAccountsActivities(ctx echo.Context) (err error)
- func (c *Component) CollectMetric(ctx context.Context, path, value string)
- func (c *Component) CollectTrace(ctx context.Context, path, value string)
- func (c *Component) GetAccountActivities(ctx echo.Context) (err error)
- func (c *Component) GetActivity(ctx echo.Context) error
- func (c *Component) GetHandles(ctx echo.Context) error
- func (c *Component) GetNetworkActivities(ctx echo.Context) (err error)
- func (c *Component) GetPlatformActivities(ctx echo.Context) (err error)
- func (c *Component) InitMeter() (err error)
- func (c *Component) Name() string
- func (c *Component) TransformActivities(ctx context.Context, activities []*activityx.Activity) []*activityx.Activity
- func (c *Component) TransformActivity(ctx context.Context, activity *activityx.Activity) (*activityx.Activity, error)
- func (c *Component) TransformSocialPost(ctx context.Context, network network.Network, platform string, ...) (activity.Action, error)
- func (c *Component) TransformSocialType(ctx context.Context, network network.Network, platform string, ...) (activity.Action, error)
- type HandleRequest
- type MetaCursor
- type MetaTotalPages
- type NetworkActivitiesRequest
- type PaginatedHandlesResponse
- type PlatformActivitiesRequest
Constants ¶
View Source
const MaxRecentRequests = 10
View Source
const Name = "federated"
Variables ¶
View Source
var (
RecentRequests *cb.Queue
)
Functions ¶
func GetRecentRequest ¶
func GetRecentRequest() []string
GetRecentRequest returns the filtered recent requests.
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 *activityx.Direction `query:"direction"`
Network []network.Network `query:"network"`
Tag []tag.Tag `query:"tag"`
Type []schema.Type `query:"-"`
Platform []federated.Platform `query:"platform"`
}
type AccountsActivitiesRequest ¶
type AccountsActivitiesRequest struct {
Accounts []string `json:"accounts" validate:"required"`
Limit int `json:"limit" validate:"min=1,max=100" default:"100"`
ActionLimit int `json:"action_limit" validate:"min=1,max=20" default:"10"`
Cursor *string `json:"cursor"`
SinceTimestamp *uint64 `json:"since_timestamp"`
UntilTimestamp *uint64 `json:"until_timestamp"`
Status *bool `json:"success"`
Direction *activityx.Direction `json:"direction"`
Network []network.Network `json:"network"`
Tag []tag.Tag `json:"tag"`
Type []string `json:"type"`
Platform []federated.Platform `json:"platform"`
}
type ActivitiesResponse ¶
type ActivitiesResponse struct {
Data []*activityx.Activity `json:"data"`
Meta *MetaCursor `json:"meta,omitempty"`
}
type ActivityRequest ¶
type ActivityResponse ¶
type ActivityResponse struct {
Data *activityx.Activity `json:"data"`
Meta *MetaTotalPages `json:"meta"`
}
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
func (*Component) BatchGetAccountsActivities ¶
BatchGetAccountsActivities returns the activities of multiple accounts in a single request
func (*Component) CollectMetric ¶
func (*Component) CollectTrace ¶
func (*Component) GetAccountActivities ¶
func (*Component) GetHandles ¶
GetHandles retrieves all active handles or updated handles based on the 'since' parameter
func (*Component) GetNetworkActivities ¶
func (*Component) GetPlatformActivities ¶
func (*Component) TransformActivities ¶
func (*Component) TransformActivity ¶
func (c *Component) TransformActivity(ctx context.Context, activity *activityx.Activity) (*activityx.Activity, error)
TransformActivity should add related URLs to the activity based on action tag, network and platform
type HandleRequest ¶
type MetaCursor ¶
type MetaCursor struct {
Cursor string `json:"cursor"`
}
type MetaTotalPages ¶
type MetaTotalPages struct {
TotalPages int `json:"totalPages"`
}
type NetworkActivitiesRequest ¶
type NetworkActivitiesRequest struct {
Network network.Network `param:"network" 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 *activityx.Direction `query:"direction"`
Tag []tag.Tag `query:"tag"`
Type []schema.Type `query:"-"`
Platform []federated.Platform `query:"platform"`
}
type PlatformActivitiesRequest ¶
type PlatformActivitiesRequest struct {
Platform federated.Platform `param:"platform" 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 *activityx.Direction `query:"direction"`
Tag []tag.Tag `query:"tag"`
Type []schema.Type `query:"-"`
Network []network.Network `query:"network"`
}
Click to show internal directories.
Click to hide internal directories.