Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// Message is a descriptive message about the authentication result, written in Title Case.
// example:Login Successful
// readOnly:true
Message string `json:"message"`
// User contains the authenticated user's details.
// example:{"id":"123","name":"John Doe"}
// readOnly:true
User map[string]any `json:"user"`
}
Auth represents the response from an authentication operation. swagger:model
type Authorize ¶
type Authorize struct {
// Code is the HTTP status code.
// example:200
// readOnly:true
Code int `json:"code"`
}
Authorize represents an authorization response for a single entity. swagger:model
type AuthorizeMany ¶
type AuthorizeMany struct {
// UnallowedEntities is the list of unauthorized entity IDs.
// example:["5f6d4b9b9c6f9f0001b9c6f9"]
// readOnly:true
UnallowedEntities []primitive.ObjectID `json:"unallowed_entities"`
}
AuthorizeMany represents an authorization response for multiple entities. swagger:model
type Error ¶
type Error struct {
// Code is the HTTP status code or custom error code.
// example:400
// readOnly:true
Code int `json:"code"`
// Message describes the error, written in Title Case.
// example:Internal Server Error
// readOnly:true
Message string `json:"message"`
}
Error represents a standard error response from the application. swagger:model
type Message ¶
type Message struct {
// Message is the response message, written in Title Case.
// example:Operation Completed
// readOnly:true
Message string `json:"message"`
}
Message represents a simple message response from the application. swagger:model
type OperationResult ¶
type OperationResult struct {
// Message describes the result of the operation, written in Title Case.
// example:Record Created Successfully
// readOnly:true
Message string `json:"message"`
// ID is the identifier of the affected resource.
// example:5f7b1b9b9b9b9b9b9b9b9b9b
// readOnly:true
ID string `json:"_id"`
}
OperationResult represents a standard response from a CRUD operation. swagger:model
type Search ¶
type Search struct {
// Results is the list of search results.
// example:[{"id":"1","name":"Item1"},{"id":"2","name":"Item2"}]
// readOnly:true
Results []any `json:"results"`
// TotalCount is the total number of matching results.
// example:100
// readOnly:true
TotalCount int32 `json:"total_count"`
// CurrentPage is the current page number.
// example:1
// readOnly:true
CurrentPage int `json:"current_page"`
// LastPage is the last page number based on total results.
// example:10
// readOnly:true
LastPage int `json:"last_page"`
}
Search represents the response from a search operation. swagger:model
Click to show internal directories.
Click to hide internal directories.