dto

package
v0.0.0-...-09aa624 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidOperatingInitials = "invalid operating initials"
	ErrInvalidControllerType    = "invalid controller type"
	ErrInvalidCertification     = "invalid certification"
	ErrInvalidRating            = "invalid rating"
	ErrInvalidStatus            = "invalid status"
)

Variables

This section is empty.

Functions

func PatchUserFromUserResponse

func PatchUserFromUserResponse(user *dbTypes.User, userResponse UserResponse) []string

Types

type FeedbackPatchRequest

type FeedbackPatchRequest struct {
	Status string `json:"status"`
}

type FeedbackRequest

type FeedbackRequest struct {
	FlightDate     string `json:"flight_date"`
	FlightCallsign string `json:"flight_callsign"`
	Controller     uint   `json:"controller"`
	Rating         string `json:"rating"`
	Position       string `json:"position"`
	Comments       string `json:"comments"`
}

type FeedbackResponse

type FeedbackResponse struct {
	ID               int    `json:"id"`
	SubmitterCID     uint   `json:"submitter"`
	SubmitterName    string `json:"submitter_name"`
	FlightDate       string `json:"flight_date"`
	FlightCallsign   string `json:"flight_callsign"`
	Rating           string `json:"rating"`
	Position         string `json:"position"`
	ControllerID     uint   `json:"controller_cid"`
	ControllerName   string `json:"controller_name"`
	ControllerRating string `json:"controller_rating"`
	Comments         string `json:"comments"`
	Status           string `json:"status"`
	CreatedAt        string `json:"created_at"`
}

func ConvertFeedbacktoResponse

func ConvertFeedbacktoResponse(feedback []dbTypes.Feedback) []FeedbackResponse

type StorageRequest

type StorageRequest struct {
	Category    string `json:"category"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UserResponse

type UserResponse struct {
	CID               uint                       `json:"cid" yaml:"cid" xml:"cid"`
	FirstName         string                     `json:"first_name" yaml:"first_name" xml:"first_name"`
	LastName          string                     `json:"last_name" yaml:"last_name" xml:"last_name"`
	OperatingInitials string                     `json:"operating_initials" yaml:"operating_initials" xml:"operating_initials"`
	ControllerType    string                     `json:"controller_type" yaml:"controller_type" xml:"controller_type"`
	RemovalReason     string                     `json:"removal_reason" yaml:"removal_reason" xml:"removal_reason"`
	Certiciations     UserResponseCertifications `json:"certifications" yaml:"certifications" xml:"certifications"`
	Rating            string                     `json:"rating" yaml:"rating" xml:"rating"`
	Status            string                     `json:"status" yaml:"status" xml:"status"`
	Roles             []string                   `json:"roles" yaml:"roles" xml:"roles"`
	DiscordID         string                     `json:"discord_id" yaml:"discord_id" xml:"discord_id"`
	CreatedAt         string                     `json:"created_at" yaml:"created_at" xml:"created_at"`
	UpdatedAt         string                     `json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

func ConvUserToUserResponse

func ConvUserToUserResponse(user *dbTypes.User) *UserResponse

type UserResponseCertifications

type UserResponseCertifications struct {
	Delivery string `json:"delivery" yaml:"delivery" xml:"delivery"`
	Ground   string `json:"ground" yaml:"ground" xml:"ground"`
	Local    string `json:"local" yaml:"local" xml:"local"`
	Approach string `json:"approach" yaml:"approach" xml:"approach"`
	Enroute  string `json:"enroute" yaml:"enroute" xml:"enroute"`
}

Jump to

Keyboard shortcuts

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