basic

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(coredb store.CoreHub, cabinet store.CabinetHub, dynHub dyndb.DataHub, pacman repox.Hub, sig service.Signer) *Controller

func (*Controller) AddUserDevice

func (c *Controller) AddUserDevice(uclaim *claim.Session, data *NewUserDevice) error

func (*Controller) GetChangeAuth

func (c *Controller) GetChangeAuth(uclaim *claim.Session) error

func (*Controller) GetChangeEmail

func (c *Controller) GetChangeEmail(uclaim *claim.Session) error

func (*Controller) GetSelfInfo

func (c *Controller) GetSelfInfo(uclaim *claim.Session) (*entities.SelfLoad, error)

func (*Controller) GetUserDevice

func (c *Controller) GetUserDevice(uclaim *claim.Session, id int64) (*entities.UserDevice, error)

func (*Controller) IssueUgroup

func (c *Controller) IssueUgroup(uclaim *claim.Session, ugroup string) (string, error)

func (*Controller) JoinNotification

func (c *Controller) JoinNotification() error

func (*Controller) ListCabinetSources

func (c *Controller) ListCabinetSources(uclaim *claim.Session) ([]string, error)

func (*Controller) ListDyndbSources

func (c *Controller) ListDyndbSources(uclaim *claim.Session) ([]string, error)

func (*Controller) ListMessages

func (c *Controller) ListMessages(uclaim *claim.Session, opts *entities.UserMessageReq) ([]*entities.UserMessage, error)

func (*Controller) ListRepoSources

func (c *Controller) ListRepoSources(uclaim *claim.Session) (map[int64]string, error)

func (*Controller) ListUserDevice

func (c *Controller) ListUserDevice(uclaim *claim.Session) ([]*entities.UserDevice, error)

func (*Controller) ModifyMessages

func (c *Controller) ModifyMessages(uclaim *claim.Session, opts *entities.ModifyMessages) error

func (*Controller) RemoveUserDevice

func (c *Controller) RemoveUserDevice(uclaim *claim.Session, id int64) error

func (*Controller) Self

func (c *Controller) Self(uclaim *claim.Session) (*entities.User, error)

func (*Controller) SelfUpdate

func (c *Controller) SelfUpdate(uclaim *claim.Session) error

func (*Controller) UpdateUserDevice

func (c *Controller) UpdateUserDevice(uclaim *claim.Session, id int64, data map[string]any) error

type NewUserDevice

type NewUserDevice struct {
	Name       string            `json:"name,omitempty"`
	DeviceType string            `json:"device_type,omitempty"`
	APNToken   string            `json:"apn_token,omitempty"`
	Scopes     string            `json:"scopes,omitempty"`
	ExtraMeta  map[string]string `json:"extra_meta,omitempty"`
}

Jump to

Keyboard shortcuts

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