myapi

package
v1.105.0-rc Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	ID        uuid.UUID `json:"id"`
	Date      time.Time `json:"date"`
	PathParam string    `json:"pathParam"`
	Body      string    `json:"body"`
	Version   Version   `json:"version"`
	Metadata  Metadata  `json:"metadata"`
}

Document is a retrieved document.

type Metadata added in v1.90.1

type Metadata struct {
	Owner string      `json:"owner,omitempty"`
	Tags  [][2]string `json:"tags"`
}

Metadata is metadata associated to a document.

type NewDocument added in v1.93.1

type NewDocument struct {
	Content string `json:"content"`
}

NewDocument contains the content the data to create a new document.

type Professional added in v1.95.1

type Professional struct {
	Company  string `json:"company"`
	Position string `json:"position"`
}

Professional contains the company and the position where a person works.

type User added in v1.93.1

type User struct {
	Name    string `json:"name"`
	Surname string `json:"surname"`
	Email   string `json:"email"`
	Professional
}

User contains information of a user.

type UserAge added in v1.95.1

type UserAge[T ~int16 | int32 | int64] struct {
	Day   uint8 `json:"day"`
	Month uint8 `json:"month"`
	Year  T     `json:"year"`
}

UserAge represents a user's age.

The value is generic for being able to increase the year's size to afford to recompile the code when we have users that were born in a too far DC year or allow to register users in a few years in the future. JOKING, we need it for testing that the API generator works fine with them.

type Version added in v1.90.1

type Version struct {
	Date   time.Time `json:"date"`
	Number uint      `json:"number"`
}

Version is document version.

Jump to

Keyboard shortcuts

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