config

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel int
const (
	Guest      AccessLevel = 10
	Reporter   AccessLevel = 20
	Developer  AccessLevel = 30
	Maintainer AccessLevel = 40
)

func (AccessLevel) String added in v0.7.0

func (ac AccessLevel) String() string

type AssignmentConfig

type AssignmentConfig struct {
	Course            string
	Name              string
	Path              string
	URL               string
	Per               Per
	Description       string
	ContainerRegistry bool
	AccessLevel       AccessLevel
	Students          []*Student
	Groups            []*Group
	Startercode       *Startercode
	Clone             *Clone
	Release           *Release
	Seeder            *Seeder
}

func GetAssignmentConfig

func GetAssignmentConfig(course, assignment string, onlyForStudentsOrGroups ...string) *AssignmentConfig

func (*AssignmentConfig) RepoSuffix added in v0.17.0

func (cfg *AssignmentConfig) RepoSuffix(student *Student) string

Using email addresses instead of usernames/user-id's results in @ in the student's name. This is incompatible to the filesystem and gitlab so replacing the values is necessary.

func (*AssignmentConfig) SetAccessLevel added in v0.16.0

func (cfg *AssignmentConfig) SetAccessLevel(level string)

func (*AssignmentConfig) SetBranch added in v0.8.0

func (cfg *AssignmentConfig) SetBranch(branch string)

func (*AssignmentConfig) SetForce added in v0.10.0

func (cfg *AssignmentConfig) SetForce()

func (*AssignmentConfig) SetLocalpath added in v0.8.0

func (cfg *AssignmentConfig) SetLocalpath(localpath string)

func (*AssignmentConfig) SetProtectToBranch added in v0.18.2

func (cfg *AssignmentConfig) SetProtectToBranch(branch string)

func (*AssignmentConfig) Show added in v0.6.0

func (cfg *AssignmentConfig) Show()

type Clone added in v0.8.0

type Clone struct {
	LocalPath string
	Branch    string
	Force     bool
}

type CourseConfig

type CourseConfig struct {
	Course   string
	Students []*Student
	Groups   []*Group
}

func GetCourseConfig

func GetCourseConfig(course string) *CourseConfig

type Group

type Group struct {
	Name    string
	Members []*Student
}

type MergeRequest added in v0.18.1

type MergeRequest struct {
	SourceBranch string
	TargetBranch string
	HasPipeline  bool
}

type Per

type Per string
const (
	PerStudent Per = "student"
	PerGroup   Per = "group"
	PerFailed  Per = "could not happen"
)

type Release added in v0.18.1

type Release struct {
	MergeRequest *MergeRequest
	DockerImages []string
}

type Seeder added in v0.13.0

type Seeder struct {
	Command         string
	Args            []string
	Name            string
	EMail           string
	SignKey         *openpgp.Entity
	ToBranch        string
	ProtectToBranch bool
}

type Startercode

type Startercode struct {
	URL                string
	FromBranch         string
	ToBranch           string
	DevBranch          string
	AdditionalBranches []string
	ProtectToBranch    bool
}

type Student added in v0.17.0

type Student struct {
	Id       *int
	Username *string
	Email    *string
	Raw      string
}

Jump to

Keyboard shortcuts

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