user

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(srv *server.Server, r chi.Router)

Types

type GetMeResponse

type GetMeResponse struct {
	GetUserResponse

	CreatedAt time.Time `json:"created_at"`
	Timezone  *string   `json:"timezone"`

	MaxInvites    int       `json:"max_invites"`
	IsAdmin       bool      `json:"is_admin"`
	ListPrivate   bool      `json:"list_private"`
	LastSIDReroll time.Time `json:"last_sid_reroll"`

	Discord         *string `json:"discord"`
	DiscordUsername *string `json:"discord_username"`

	Tumblr         *string `json:"tumblr"`
	TumblrUsername *string `json:"tumblr_username"`

	Google         *string `json:"google"`
	GoogleUsername *string `json:"google_username"`

	Fediverse         *string `json:"fediverse"`
	FediverseUsername *string `json:"fediverse_username"`
	FediverseInstance *string `json:"fediverse_instance"`
}

type GetUserResponse

type GetUserResponse struct {
	ID                xid.ID               `json:"id"`
	SnowflakeID       common.UserID        `json:"id_new"`
	SID               string               `json:"sid"`
	Username          string               `json:"name"`
	DisplayName       *string              `json:"display_name"`
	Bio               *string              `json:"bio"`
	MemberTitle       *string              `json:"member_title"`
	Avatar            *string              `json:"avatar"`
	Links             []string             `json:"links"`
	Names             []db.FieldEntry      `json:"names"`
	Pronouns          []db.PronounEntry    `json:"pronouns"`
	Members           []PartialMember      `json:"members"`
	Fields            []db.Field           `json:"fields"`
	CustomPreferences db.CustomPreferences `json:"custom_preferences"`
	Flags             []db.UserFlag        `json:"flags"`
	Badges            db.Badge             `json:"badges"`
	UTCOffset         *int                 `json:"utc_offset"`
}

type PartialMember

type PartialMember struct {
	ID          xid.ID            `json:"id"`
	SnowflakeID common.MemberID   `json:"id_new"`
	SID         string            `json:"sid"`
	Name        string            `json:"name"`
	DisplayName *string           `json:"display_name"`
	Bio         *string           `json:"bio"`
	Avatar      *string           `json:"avatar"`
	Links       []string          `json:"links"`
	Names       []db.FieldEntry   `json:"names"`
	Pronouns    []db.PronounEntry `json:"pronouns"`
}

type PatchUserRequest

type PatchUserRequest struct {
	Username          *string               `json:"name"`
	DisplayName       *string               `json:"display_name"`
	Bio               *string               `json:"bio"`
	MemberTitle       *string               `json:"member_title"`
	Links             *[]string             `json:"links"`
	Names             *[]db.FieldEntry      `json:"names"`
	Pronouns          *[]db.PronounEntry    `json:"pronouns"`
	Fields            *[]db.Field           `json:"fields"`
	Avatar            *string               `json:"avatar"`
	Timezone          *string               `json:"timezone"`
	ListPrivate       *bool                 `json:"list_private"`
	CustomPreferences *db.CustomPreferences `json:"custom_preferences"`
	Flags             *[]xid.ID             `json:"flags"`
}

type Server

type Server struct {
	*server.Server

	ExporterPath string
}

Jump to

Keyboard shortcuts

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