Documentation
¶
Index ¶
- type Client
- func (c *Client) AddGroupGuests(courseName string) error
- func (c *Client) Archive(assignmentCfg *config.AssignmentConfig, unarchive bool) error
- func (c *Client) CheckCourse(cfg *config.CourseConfig) bool
- func (c *Client) Delete(assignmentCfg *config.AssignmentConfig) error
- func (c *Client) Generate(assignmentCfg *config.AssignmentConfig) error
- func (c *Client) ProtectToBranch(assignmentCfg *config.AssignmentConfig) error
- func (c *Client) Push(assignmentCfg *config.AssignmentConfig, branchname string) error
- func (c *Client) Report(assignmentCfg *config.AssignmentConfig, templateFile *string, output *string) error
- func (c *Client) ReportHTML(assignmentCfg *config.AssignmentConfig, templateFile *string, output *string) error
- func (c *Client) ReportJSON(assignmentCfg *config.AssignmentConfig, output *string) error
- func (c *Client) Setaccess(assignmentCfg *config.AssignmentConfig) error
- func (c *Client) Update(assignmentCfg *config.AssignmentConfig) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
NewClient builds a GitLab client from the given options. host and token are required; a bad configuration is an error rather than a panic, so a server can report it instead of dying.
func NewClientFromViper ¶ added in v3.0.1
NewClientFromViper builds a client from the global config. It is the CLI's entry point, keeping the single-token model; the web server uses NewClient with a per-user token instead.
func (*Client) AddGroupGuests ¶
AddGroupGuests adds all students from an assignment config as guests to the course subgroup (coursepath/semesterpath). This enables students to use the Dependency-Proxy.
func (*Client) Archive ¶
func (c *Client) Archive(assignmentCfg *config.AssignmentConfig, unarchive bool) error
func (*Client) CheckCourse ¶
func (c *Client) CheckCourse(cfg *config.CourseConfig) bool
func (*Client) ProtectToBranch ¶
func (c *Client) ProtectToBranch(assignmentCfg *config.AssignmentConfig) error
func (*Client) Push ¶
func (c *Client) Push(assignmentCfg *config.AssignmentConfig, branchname string) error
func (*Client) ReportHTML ¶
func (*Client) ReportJSON ¶
func (c *Client) ReportJSON(assignmentCfg *config.AssignmentConfig, output *string) error
type Option ¶ added in v3.0.1
type Option func(*clientOptions)
func WithHTTPClient ¶ added in v3.0.1
WithHTTPClient injects the underlying HTTP client.
func WithReporter ¶ added in v3.0.1
WithReporter sets where the client's progress goes. Defaults to a ConsoleReporter (spinners on stdout); the web server passes a streaming one.
func WithoutRetries ¶ added in v3.0.1
func WithoutRetries() Option
WithoutRetries disables the client's retry-on-5xx wrapper. The contract tests use it so a mocked 5xx returns immediately instead of retrying with backoff.