handlers

package
v0.0.0-...-c37906c Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bounty

type Bounty struct {
	OwnerID int64  `json:"owner_id"`
	Title   string `json:"title"`
	URL     string `json:"url"`
	Reward  string `json:"reward"`
}

func BountyFromEntity

func BountyFromEntity(e *entity.Bounty) Bounty

type BountyResponse

type BountyResponse struct {
	Bounties []BountyWithOwner `json:"bounties"`
}

type BountyWithOwner

type BountyWithOwner struct {
	OwnerID        int64  `json:"owner_id"`
	Owner          string `json:"owner"`
	OwnerURL       string `json:"owner_url"`
	OwnerAvatarURL string `json:"owner_avatar_url"`
	OwnerType      string `json:"owner_type"`
	Title          string `json:"title"`
	URL            string `json:"url"`
	Reward         string `json:"reward"`
}

func BountyWithOwnerFromEntity

func BountyWithOwnerFromEntity(e *entity.BountyWithOwner) BountyWithOwner

type Handlers

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

func New

func New(services *service.Services, whSecret string, logger *zap.SugaredLogger) (*Handlers, error)

func (*Handlers) HTTP

func (h *Handlers) HTTP() http.Handler

type InstallationInfoResponse

type InstallationInfoResponse struct {
	Installed bool   `json:"installed"`
	OwnerName string `json:"owner_name"`
	OwnerID   int64  `json:"owner_id"`
}

type OwnerInfoResponse

type OwnerInfoResponse struct {
	Name              string   `json:"name"`
	AvatarURL         string   `json:"avatar_url"`
	TotalBudget       string   `json:"total_budget"`
	AvailableBudget   string   `json:"available_budget"`
	TotalBounties     int      `json:"total_bounties"`
	AvailableBounties int      `json:"available_bounties"`
	Bounties          []Bounty `json:"bounties"`
}

type SetupRequest

type SetupRequest struct {
	InstallationID int64  `json:"installation_id"`
	WalletAddress  string `json:"wallet_address"`
}

Jump to

Keyboard shortcuts

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