model

package
v0.0.0-...-48b0c02 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

This type is not rigged up with GraphQL, and is only used internally.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	ID  int
	SHA string
}

type File

type File struct {
	Filename *string `json:"filename"`

	PasteID int
	BlobID  int
	// contains filtered or unexported fields
}

func (*File) Alias

func (file *File) Alias() string

func (*File) As

func (file *File) As(alias string) *File

func (*File) Fields

func (file *File) Fields() *database.ModelFields

func (*File) Table

func (file *File) Table() string

type Paste

type Paste struct {
	ID      string    `json:"id"`
	Created time.Time `json:"created"`

	PKID          int
	UserID        int
	RawVisibility string
	// contains filtered or unexported fields
}

func (*Paste) Alias

func (paste *Paste) Alias() string

func (*Paste) As

func (paste *Paste) As(alias string) *Paste

func (*Paste) Fields

func (paste *Paste) Fields() *database.ModelFields

func (*Paste) QueryWithCursor

func (paste *Paste) QueryWithCursor(ctx context.Context,
	runner sq.BaseRunner, q sq.SelectBuilder,
	cur *model.Cursor) ([]*Paste, *model.Cursor)

func (*Paste) Table

func (paste *Paste) Table() string

func (*Paste) Visibility

func (paste *Paste) Visibility() Visibility

type URL

type URL struct {
	Url *url.URL
}

XXX: gqlgen bug prevents us from using type URL *url.URL

func (URL) MarshalGQL

func (u URL) MarshalGQL(w io.Writer)

func (*URL) UnmarshalGQL

func (u *URL) UnmarshalGQL(v interface{}) error

type User

type User struct {
	ID       int       `json:"id"`
	Created  time.Time `json:"created"`
	Username string    `json:"username"`
	// contains filtered or unexported fields
}

func (*User) Alias

func (u *User) Alias() string

func (*User) As

func (u *User) As(alias string) *User

func (*User) CanonicalName

func (u *User) CanonicalName() string

func (*User) Fields

func (u *User) Fields() *database.ModelFields

func (User) IsEntity

func (User) IsEntity()

func (*User) Table

func (u *User) Table() string

type UserWebhookSubscription

type UserWebhookSubscription struct {
	ID     int            `json:"id"`
	Events []WebhookEvent `json:"events"`
	Query  string         `json:"query"`
	URL    string         `json:"url"`

	UserID     int
	AuthMethod string
	ClientID   *string
	TokenHash  *string
	Expires    *time.Time
	Grants     *string
	NodeID     *string
	// contains filtered or unexported fields
}

func (*UserWebhookSubscription) Alias

func (sub *UserWebhookSubscription) Alias() string

func (*UserWebhookSubscription) As

func (*UserWebhookSubscription) Fields

func (UserWebhookSubscription) IsWebhookSubscription

func (UserWebhookSubscription) IsWebhookSubscription()

func (*UserWebhookSubscription) QueryWithCursor

func (sub *UserWebhookSubscription) QueryWithCursor(ctx context.Context,
	runner sq.BaseRunner, q sq.SelectBuilder,
	cur *model.Cursor) ([]WebhookSubscription, *model.Cursor)

func (*UserWebhookSubscription) Table

func (sub *UserWebhookSubscription) Table() string

type WebhookDelivery

type WebhookDelivery struct {
	UUID            string       `json:"uuid"`
	Date            time.Time    `json:"date"`
	Event           WebhookEvent `json:"event"`
	RequestBody     string       `json:"requestBody"`
	ResponseBody    *string      `json:"responseBody"`
	ResponseHeaders *string      `json:"responseHeaders"`
	ResponseStatus  *int         `json:"responseStatus"`

	ID             int
	SubscriptionID int
	Name           string
	// contains filtered or unexported fields
}

func (*WebhookDelivery) Alias

func (whd *WebhookDelivery) Alias() string

func (*WebhookDelivery) As

func (whd *WebhookDelivery) As(alias string) *WebhookDelivery

func (*WebhookDelivery) Fields

func (whd *WebhookDelivery) Fields() *database.ModelFields

func (*WebhookDelivery) QueryWithCursor

func (whd *WebhookDelivery) QueryWithCursor(ctx context.Context,
	runner sq.BaseRunner, q sq.SelectBuilder,
	cur *model.Cursor) ([]*WebhookDelivery, *model.Cursor)

func (*WebhookDelivery) Table

func (whd *WebhookDelivery) Table() string

func (*WebhookDelivery) WithName

func (whd *WebhookDelivery) WithName(name string) *WebhookDelivery

Jump to

Keyboard shortcuts

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