types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Id        int       `json:"id,string"`
	ParentId  int       `json:"parentId"`
	CreatedAt time.Time `json:"createdAt"`
	Text      string    `json:"text"`
	User      User      `json:"user"`
	Comments  []Comment `json:"comments"`
}

type CreateInvoiceArgs

type CreateInvoiceArgs struct {
	Amount      int
	ExpireSecs  int
	HodlInvoice bool
}

type CreateInvoiceResponse

type CreateInvoiceResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		CreateInvoice Invoice `json:"createInvoice"`
	} `json:"data"`
}

type Dupe

type Dupe struct {
	Id        int       `json:"id,string"`
	Url       string    `json:"url"`
	Title     string    `json:"title"`
	User      User      `json:"user"`
	CreatedAt time.Time `json:"createdAt"`
	Sats      int       `json:"sats"`
	NComments int       `json:"ncomments"`
}

type DupesError

type DupesError struct {
	Url   string
	Dupes []Dupe
}

func (*DupesError) Error

func (e *DupesError) Error() string

type DupesResponse

type DupesResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		Dupes []Dupe `json:"dupes"`
	} `json:"data"`
}

type GetSignedPOST

type GetSignedPOST struct {
	Url    string            `json:"url"`
	Fields map[string]string `json:"fields"`
}

type GetSignedPOSTResponse

type GetSignedPOSTResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		GetSignedPOST GetSignedPOST `json:"getSignedPOST"`
	} `json:"data"`
}

type GqlBody

type GqlBody struct {
	Query     string                 `json:"query"`
	Variables map[string]interface{} `json:"variables,omitempty"`
}

type GqlError

type GqlError struct {
	Message string `json:"message"`
}

type Invoice

type Invoice struct {
	Id                int                    `json:"id,string"`
	Hash              string                 `json:"hash"`
	Hmac              string                 `json:"hmac"`
	Bolt11            string                 `json:"bolt11"`
	SatsRequested     int                    `json:"satsRequested"`
	SatsReceived      int                    `json:"satsReceived"`
	Cancelled         bool                   `json:"cancelled"`
	ConfirmedAt       time.Time              `json:"createdAt"`
	ExpiresAt         time.Time              `json:"expiresAt"`
	Nostr             map[string]interface{} `json:"nostr"`
	IsHeld            bool                   `json:"isHeld"`
	Comment           string                 `json:"comment"`
	Lud18Data         map[string]interface{} `json:"lud18Data"`
	ConfirmedPreimage string                 `json:"confirmedPreimage"`
	ActionState       string                 `json:"actionState"`
	ActionType        string                 `json:"actionType"`
}

type Item

type Item struct {
	Id        int       `json:"id,string"`
	ParentId  int       `json:"parentId"`
	Title     string    `json:"title"`
	Url       string    `json:"url"`
	Text      string    `json:"text"`
	Sats      int       `json:"sats"`
	CreatedAt time.Time `json:"createdAt"`
	DeletedAt null.Time `json:"deletedAt"`
	Comments  []Comment `json:"comments"`
	NComments int       `json:"ncomments"`
	User      User      `json:"user"`
}

type ItemResponse

type ItemResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		Item Item `json:"item"`
	} `json:"data"`
}

type ItemsCursor

type ItemsCursor struct {
	Items  []Item `json:"items"`
	Cursor string `json:"cursor"`
}

type ItemsQuery

type ItemsQuery struct {
	Sub    string
	Sort   string
	Type   string
	Cursor string
	Name   string
	When   string
	By     string
	Limit  int
}

type ItemsResponse

type ItemsResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		Items ItemsCursor `json:"items"`
	} `json:"data"`
}

type MeResponse

type MeResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		Me User `json:"me"`
	} `json:"data"`
}

type Notification

type Notification struct {
	Id   int    `json:"id,string"`
	Type string `json:"__typename"`
	Item Item   `json:"item"`
}

type NotificationsCursor

type NotificationsCursor struct {
	LastChecked   time.Time      `json:"lastChecked"`
	Cursor        string         `json:"cursor"`
	Notifications []Notification `json:"notifications"`
}

type NotificationsResponse

type NotificationsResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		Notifications NotificationsCursor `json:"notifications"`
	} `json:"data"`
}

type PayIn

type PayIn struct {
	Id            int `json:"id"`
	PayerPrivates struct {
		PayInFailureReason string `json:"payInFailureReason"`
		PayInBolt11        struct {
			Id int `json:"id"`
		} `json:"payInBolt11"`
		Result struct {
			Id int `json:"id,string"`
		} `json:"result"`
	} `json:"payerPrivates"`
}

type PaymentMethod

type PaymentMethod string
const (
	PaymentMethodFeeCredits  PaymentMethod = "FEE_CREDIT"
	PaymentMethodOptimistic  PaymentMethod = "OPTIMISTIC"
	PaymentMethodPessimistic PaymentMethod = "PESSIMISTIC"
)

type Rss

type Rss struct {
	Channel RssChannel `xml:"channel"`
}

type RssAuthor

type RssAuthor struct {
	Name string `xml:"name"`
}

type RssChannel

type RssChannel struct {
	Title         string    `xml:"title"`
	Description   string    `xml:"description"`
	Link          string    `xml:"link"`
	Items         []RssItem `xml:"item"`
	LastBuildDate RssDate   `xml:"lastBuildDate"`
}

type RssDate

type RssDate struct {
	time.Time
}

func (*RssDate) UnmarshalXML

func (c *RssDate) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type RssItem

type RssItem struct {
	Guid        string    `xml:"guid"`
	Title       string    `xml:"title"`
	Link        string    `xml:"link"`
	Description string    `xml:"description"`
	PubDate     RssDate   `xml:"pubDate"`
	Author      RssAuthor `xml:"author"`
}

type UpsertCommentResponse

type UpsertCommentResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		UpsertComment PayIn `json:"upsertComment"`
	} `json:"data"`
}

type UpsertDiscussionResponse

type UpsertDiscussionResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		UpsertDiscussion PayIn `json:"upsertDiscussion"`
	} `json:"data"`
}

type UpsertLinkResponse

type UpsertLinkResponse struct {
	Errors []GqlError `json:"errors"`
	Data   struct {
		UpsertLink PayIn `json:"upsertLink"`
	} `json:"data"`
}

type User

type User struct {
	Id       int          `json:"id,string"`
	Name     string       `json:"name"`
	Privates UserPrivates `json:"privates"`
}

type UserPrivates

type UserPrivates struct {
	Sats int `json:"sats"`
}

Jump to

Keyboard shortcuts

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