profiles

package
v0.0.0-...-cf413bb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptProfileInvite

type AcceptProfileInvite struct {
	Login    string
	Password string
	Name     string
	Code     string
}

type Profile

type Profile struct {
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Icon    string   `json:"icon,omitempty"`
	Targets []Target `json:"targets"`
}

func AcceptInvite

func AcceptInvite(db *sql.DB, input AcceptProfileInvite) (Profile, error)

func Get

func Get(db *sql.DB, id string) (Profile, error)

func LookupInvite

func LookupInvite(db *sql.DB, code string) (Profile, bool)

type ProfileInvite

type ProfileInvite struct {
	URL  *url.URL `json:"url"`
	Name string
}

func Invite

func Invite(db *sql.DB, name string, inviteURL *url.URL) (ProfileInvite, error)

type Target

type Target struct {
	Id   string `json:"id"`
	Type string `json:"-"`
	Name string `json:"name"`
	Icon string `json:"icon,omitempty"`
}

Jump to

Keyboard shortcuts

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