dto

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Credentials *Credentials `json:"credentials,omitempty" binding:"required"`
}

Auth contains the credentials needed to begin the authentication process.

type Credentials

type Credentials struct {
	Username string `json:"username,omitempty" binding:"required"`
	Password string `json:"password,omitempty" binding:"required"`
}

Credentials represents a username and password combination.

type Health

type Health struct {
	Healthy bool   `json:"healthy"`
	Reason  string `json:"reason,omitempty"`
}

Health represents health status of the application.

type InstantMeeting

type InstantMeeting struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

InstantMeeting is a meeting that is going to take place at the current moment.

type Invite

type Invite struct {
	ID                uint    `json:"id"`
	MeetingPlatformID uint    `json:"meeting_platform" binding:"required"`
	InviterID         uint    `json:"inviter_id" binding:"required"`
	Invitee           User    `json:"invitee" binding:"required"`
	Meeting           Meeting `json:"meeting"`
}

Invite represents invitation to a meeting.

type InviteRequest

type InviteRequest struct {
	MeetingID         string `json:"meeting_id" binding:"required"`
	InviterID         uint   `json:"inviter_id" binding:"required"`
	InviteeUsername   string `json:"invitee_username" binding:"required"`
	MeetingPlatformID uint   `json:"meeting_platform_id" binding:"required"`
}

InviteRequest represents a request to invite a user to a meeting.

type Meeting

type Meeting struct {
	ID          string          `json:"id,omitempty"`
	Title       string          `json:"title,omitempty" binding:"required"`
	StartTime   string          `json:"start_time,omitempty" binding:"required,valid meeting time"`
	Duration    MeetingDuration `json:"duration,omitempty" binding:"required"`
	Description string          `json:"description,omitempty" binding:"required"`
	JoinURL     string          `json:"join_url,omitempty"`
	StartURL    string          `json:"start_url,omitempty"`
}

Meeting represents a information about a scheduled meeting on a meeting platform.

type MeetingDuration

type MeetingDuration time.Duration

MeetingDuration is the duration for a meeting.

func (*MeetingDuration) MarshalJSON

func (m *MeetingDuration) MarshalJSON() ([]byte, error)

MarshalJSON converts a MeetingDuration to JSON format.

func (*MeetingDuration) UnmarshalJSON

func (m *MeetingDuration) UnmarshalJSON(data []byte) error

UnmarshalJSON parses JSON and attempts to convert the data to a MeetingDuration.

type MeetingPage

type MeetingPage struct {
	PageCount     int        `json:"page_count,omitempty"`
	PageNumber    int        `json:"page_number,omitempty"`
	PageSize      int        `json:"page_size,omitempty"`
	TotalRecords  int        `json:"total_records,omitempty"`
	NextPageToken string     `json:"next_page_token,omitempty"`
	Records       []*Meeting `json:"meetings"`
}

MeetingPage represents a paged collection of Meetings.

type MeetingPlatform

type MeetingPlatform struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	RedirectURL string `json:"redirect_url"`
}

MeetingPlatform represents information about a meeting platform.

type PageRequest

type PageRequest struct {
	PageSize      int
	RequestedPage string
}

PageRequest contains information about a page to retrieve.

func NewPageReq

func NewPageReq(size int, requestedPage string) *PageRequest

NewPageReq returns a new PageRequest with the specified parameters.

type Resource

type Resource struct {
	ID int `json:"id"`
}

Resource represents an resource within the application.

type Token

type Token struct {
	Value string `json:"token,omitempty" binding:"required"`
}

Token contains a string based token that can be used for authentication.

type User

type User struct {
	ID        uint   `json:"id,omitempty"`
	Firstname string `json:"firstname,omitempty" binding:"required"`
	Lastname  string `json:"lastname,omitempty" binding:"required"`
	Username  string `json:"username,omitempty" binding:"required"`
	Password  string `json:"password,omitempty" binding:"required"`
}

User represents information about a user.

func NewUser

func NewUser(firstname string, lastname string, username string, password string) *User

NewUser returns a pointer to a User which contains the given parameters.

Jump to

Keyboard shortcuts

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