hackathon/api/v1/codequest.gunk

35 lines
1014 B
Go

2021-12-19 15:30:21 +07:00
// +gunk proto.Package("hhhapz.codequest.v1")
package codequest
import (
"github.com/gunk/opt/http"
"github.com/gunk/opt/openapiv2"
"github.com/gunk/opt/proto"
"time"
)
2022-04-28 23:31:09 +07:00
// Info is the current information about the competition.
type Info struct {
CurrentUser User `pb:"1" json:"currentUser"`
Active bool `pb:"2" json:"active"`
Points int `pb:"5" json:"points"`
StartTime string `pb:"3" json:"startTime"`
EndTime string `pb:"4" json:"endTime"`
}
2021-12-19 15:30:21 +07:00
// User is a contestant in the competition.
type User struct {
// ID of the user. Received via Google's OAuth2 API.
ID string `pb:"1" json:"id"`
// Name of the user.
Name string `pb:"2" json:"name"`
// Email of the user.
Email string `pb:"3" json:"email"`
// Picture is the URL of the user's profile picture.
Picture string `pb:"4" json:"picture"`
// Admin is true if the user is an administrator.
Admin bool `pb:"6" json:"admin"`
// CreatedAt is the time the user was created.
2022-04-28 23:31:09 +07:00
CreatedAt string `pb:"7" json:"createdAt"`
2021-12-19 15:30:21 +07:00
}