model

package
v0.0.0-...-29c9779 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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogEntry

type AuditLogEntry struct {
	ID        int       `json:"id"`
	Created   time.Time `json:"created"`
	IPAddress string    `json:"ipAddress"`
	EventType string    `json:"eventType"`
	Details   *string   `json:"details"`

	UserID int
	// contains filtered or unexported fields
}

func (*AuditLogEntry) Alias

func (e *AuditLogEntry) Alias() string

func (*AuditLogEntry) As

func (e *AuditLogEntry) As(alias string) *AuditLogEntry

func (*AuditLogEntry) Fields

func (e *AuditLogEntry) Fields() *database.ModelFields

func (*AuditLogEntry) QueryWithCursor

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

func (*AuditLogEntry) Table

func (e *AuditLogEntry) Table() string

type Invoice

type Invoice struct {
	ID        int       `json:"id"`
	Created   time.Time `json:"created"`
	Cents     int       `json:"cents"`
	ValidThru time.Time `json:"validThru"`
	Source    *string   `json:"source"`

	UserID int
	// contains filtered or unexported fields
}

func (*Invoice) Alias

func (i *Invoice) Alias() string

func (*Invoice) As

func (inv *Invoice) As(alias string) *Invoice

func (*Invoice) Fields

func (i *Invoice) Fields() *database.ModelFields

func (*Invoice) QueryWithCursor

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

func (*Invoice) Table

func (i *Invoice) Table() string

type OAuthClient

type OAuthClient struct {
	ID          int     `json:"id"`
	UUID        string  `json:"uuid"`
	RedirectURL string  `json:"redirectUrl"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
	URL         *string `json:"url"`

	OwnerID int
	// contains filtered or unexported fields
}

func (*OAuthClient) Alias

func (o *OAuthClient) Alias() string

func (*OAuthClient) As

func (oc *OAuthClient) As(alias string) *OAuthClient

func (*OAuthClient) Fields

func (o *OAuthClient) Fields() *database.ModelFields

func (*OAuthClient) Query

func (oc *OAuthClient) Query(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder) []*OAuthClient

func (*OAuthClient) Table

func (o *OAuthClient) Table() string

func (*OAuthClient) VerifyClientSecret

func (oc *OAuthClient) VerifyClientSecret(clientSecret string) bool

type OAuthGrant

type OAuthGrant struct {
	ID        int       `json:"id"`
	Issued    time.Time `json:"issued"`
	Expires   time.Time `json:"expires"`
	TokenHash string    `json:"token_hash"`

	ClientID int `json:"client"`
	// contains filtered or unexported fields
}

func (*OAuthGrant) Alias

func (o *OAuthGrant) Alias() string

func (*OAuthGrant) As

func (og *OAuthGrant) As(alias string) *OAuthGrant

func (*OAuthGrant) Fields

func (o *OAuthGrant) Fields() *database.ModelFields

func (*OAuthGrant) Query

func (og *OAuthGrant) Query(ctx context.Context, runner sq.BaseRunner,
	q sq.SelectBuilder) []*OAuthGrant

func (*OAuthGrant) Table

func (o *OAuthGrant) Table() string

type OAuthPersonalToken

type OAuthPersonalToken struct {
	ID      int       `json:"id"`
	Issued  time.Time `json:"issued"`
	Expires time.Time `json:"expires"`
	Comment *string   `json:"comment"`
	// contains filtered or unexported fields
}

func (*OAuthPersonalToken) Alias

func (tok *OAuthPersonalToken) Alias() string

func (*OAuthPersonalToken) As

func (*OAuthPersonalToken) Fields

func (tok *OAuthPersonalToken) Fields() *database.ModelFields

func (*OAuthPersonalToken) Query

func (*OAuthPersonalToken) Table

func (tok *OAuthPersonalToken) Table() string

type PGPKey

type PGPKey struct {
	ID      int       `json:"id"`
	Created time.Time `json:"created"`
	Key     string    `json:"key"`

	UserID         int
	RawFingerprint []byte
	// contains filtered or unexported fields
}

func (*PGPKey) Alias

func (k *PGPKey) Alias() string

func (*PGPKey) As

func (k *PGPKey) As(alias string) *PGPKey

func (*PGPKey) Fields

func (k *PGPKey) Fields() *database.ModelFields

func (*PGPKey) Fingerprint

func (k *PGPKey) Fingerprint() string

func (*PGPKey) QueryWithCursor

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

func (*PGPKey) Table

func (k *PGPKey) Table() string

type ProfileWebhookSubscription

type ProfileWebhookSubscription 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 (*ProfileWebhookSubscription) Alias

func (sub *ProfileWebhookSubscription) Alias() string

func (*ProfileWebhookSubscription) As

func (*ProfileWebhookSubscription) Fields

func (ProfileWebhookSubscription) IsWebhookSubscription

func (ProfileWebhookSubscription) IsWebhookSubscription()

func (*ProfileWebhookSubscription) QueryWithCursor

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

func (*ProfileWebhookSubscription) Table

func (sub *ProfileWebhookSubscription) Table() string

type SSHKey

type SSHKey struct {
	ID          int        `json:"id"`
	Created     time.Time  `json:"created"`
	LastUsed    *time.Time `json:"lastUsed"`
	Key         string     `json:"key"`
	Fingerprint string     `json:"fingerprint"`
	Comment     *string    `json:"comment"`

	UserID int
	// contains filtered or unexported fields
}

func (*SSHKey) Alias

func (k *SSHKey) Alias() string

func (*SSHKey) As

func (k *SSHKey) As(alias string) *SSHKey

func (*SSHKey) Fields

func (k *SSHKey) Fields() *database.ModelFields

func (*SSHKey) QueryWithCursor

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

func (*SSHKey) Table

func (k *SSHKey) Table() string

type User

type User struct {
	ID               int       `json:"id"`
	Created          time.Time `json:"created"`
	Updated          time.Time `json:"updated"`
	Username         string    `json:"username"`
	Email            string    `json:"email"`
	URL              *string   `json:"url"`
	Location         *string   `json:"location"`
	Bio              *string   `json:"bio"`
	SuspensionNotice *string   `json:"suspensionNotice"`

	UserTypeRaw string
	PGPKeyID    *int
	// 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

func (*User) UserType

func (u *User) UserType() UserType

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