Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateConfig = &request.Config{
Action: "POST",
Resource: "groups",
}
View Source
var GetConfig = &request.Config{ Action: "GET", Resource: "groups/:group_id", Headers: map[string]string{ "Content-Type": "application/json", }, }
View Source
var ListConfig = &request.Config{
Action: "GET",
Resource: "groups",
}
Functions ¶
Types ¶
type CreateRequest ¶
type CreateResponse ¶
type CreateResponse = Group
func Create ¶
func Create(client client.Client, req *CreateRequest) (*CreateResponse, error)
type GetRequest ¶
type GetRequest struct {
GroupID int64 `json:"group_id"`
}
type GetResponse ¶
type GetResponse = Group
func Get ¶
func Get(client client.Client, cfg *GetRequest) (*GetResponse, error)
type Group ¶
type Group struct {
//
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Description string `json:"description"`
WebURL string `json:"web_url"`
FullName string `json:"full_name"`
FullPath string `json:"full_path"`
CreatedAt time.Time `json:"created_at"`
ParentID int64 `json:"parent_id"`
//
Visibility string `json:"visibility"` // internal, public, internal_only
RequireTwoFactorAuthentication bool `json:"require_two_factor_authentication"`
TwoFactorGracePeriod int `json:"two_factor_grace_period"`
ProjectCreationLevel string `json:"project_creation_level"` // owner, developer, reporter, guest
AutoDevOpsEnabled bool `json:"auto_devops_enabled"`
SubgroupCreationLevel string `json:"subgroup_creation_level"` // owner, developer, reporter, guest
EmailsDisabled bool `json:"emails_disabled"`
MentionsDisabled bool `json:"mentions_disabled"`
LFSEnabled bool `json:"lfs_enabled"`
DefaultBranchProtection int `json:"default_branch_protection"` // 0, 1, 2
AvatarURL string `json:"avatar_url"`
RequestAccessEnabled bool `json:"request_access_enabled"`
LDAPCN string `json:"ldap_cn"`
LDAPAccess string `json:"ldap_access"`
// contains filtered or unexported fields
}
type GroupImpl ¶
type GroupImpl interface {
List(cfg *ListRequest) (*[]Group, error)
Get(cfg *GetRequest) (*Group, error)
Search(keyword string) (*[]Group, error)
}
type ListRequest ¶
type ListRequest struct {
Search string `json:"search"`
}
type ListResponse ¶
type ListResponse = []Group
func List ¶
func List(client client.Client, cfg *ListRequest) (*ListResponse, error)
Click to show internal directories.
Click to hide internal directories.