Documentation
¶
Index ¶
- Constants
- type AuthResponse
- type Client
- func (c *Client) CreateReviews(reviews []Review) error
- func (c *Client) GetAllMembers() ([]MemberInfo, error)
- func (c *Client) GetMembers(page int, pageSize int) ([]MemberInfo, error)
- func (c *Client) GetSubmissions(user string, challenge string) ([]SubmissionInfo, error)
- func (c *Client) Login(username string, password string) (string, error)
- func (c *Client) Request(method string, url string, body io.Reader) (*http.Response, error)
- func (c *Client) SyncWhitelist(members Members) error
- type Credentials
- type MemberInfo
- type Members
- type Review
- type SubmissionInfo
- type User
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" ContentTypeHeader = "Content-Type" )
View Source
const ( SubmissionBaseUrl string = "api/submission/v1/submissions" UserParam string = "user" ChallengeParam string = "challenge" )
View Source
const ( MembersBaseUrl string = "api/auth/v1/users" PageParam string = "page" PageSizeParam string = "pageSize" )
View Source
const (
LoginURL string = "api/auth/v1/authenticate"
)
View Source
const (
ReviewBaseUrl string = "api/review/v1/reviews"
)
View Source
const (
WhitelistBaseUrl string = "api/auth/v1/whitelist"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct {
Token string `json:"token"`
}
type Client ¶
func (*Client) CreateReviews ¶
func (*Client) GetAllMembers ¶
func (c *Client) GetAllMembers() ([]MemberInfo, error)
func (*Client) GetMembers ¶
func (c *Client) GetMembers(page int, pageSize int) ([]MemberInfo, error)
func (*Client) GetSubmissions ¶
func (c *Client) GetSubmissions(user string, challenge string) ([]SubmissionInfo, error)
func (*Client) SyncWhitelist ¶
type Credentials ¶
type MemberInfo ¶
type MemberInfo struct { Id string `json:"id"` Title string `json:"title"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Email string `json:"email"` Role string `json:"role"` }
func (*MemberInfo) ToRow ¶
func (s *MemberInfo) ToRow() []string
type SubmissionInfo ¶
type SubmissionInfo struct { Challenge string `json:"challenge"` User string `json:"user"` Points int `json:"points"` }
func (*SubmissionInfo) ToRow ¶
func (s *SubmissionInfo) ToRow() []string
Click to show internal directories.
Click to hide internal directories.