api

package
v0.0.0-...-84686e3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("unauthorized request")

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger   logrus.FieldLogger
	Database database.AppDatabase
}

type LogReq

type LogReq struct {
	Username  string `json:"name"`
	Userphoto string `json:"photo"`
}

type LoginResult

type LoginResult struct {
	Identifier string `json:"identifier"`
}

type Message

type Message struct {
	ID        string    `json:"id"`
	SenderID  string    `json:"senderId"`
	Content   string    `json:"content"`
	Timestamp time.Time `json:"timestamp"`
}

type ModifyUserRequest

type ModifyUserRequest struct {
	Name string `json:"name"`
}

type Router

type Router interface {
	Handler() http.Handler
	Close() error
}

func New

func New(cfg Config) (Router, error)

type UpdateGroupRequest

type UpdateGroupRequest struct {
	Name string `json:"name"`
}

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Photo []byte `json:"photo"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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