{"modulePath":"github.com/coding/drone","version":"v0.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package client\n\n## Types\n\n```go\ntype Client struct {\n\tBaseUrl string\n\tApiPath string\n\tToken   string\n\tClient  *http.Client\n}\n```\n\n```go\nfunc New(baseUrl, apiPath, token string, skipVerify bool) *Client\n```\n\n```go\nfunc (c *Client) AddDroneService(id string, params QMap) error\n```\n\n```go\nfunc (g *Client) AllGroups() ([]*Namespace, error)\n```\nGet a list of all projects owned by the authenticated user.\n\n```go\nfunc (g *Client) AllProjects(hide_archives bool) ([]*Project, error)\n```\nGet a list of all projects owned by the authenticated user.\n\n```go\nfunc (c *Client) CurrentUser() (User, error)\n```\n\n```go\nfunc (c *Client) DeleteDroneService(id string) error\n```\n\n```go\nfunc (c *Client) Do(method, url, opaque string, body []byte) ([]byte, error)\n```\n\n```go\nfunc (g *Client) Groups(page, perPage int) ([]*Namespace, error)\n```\n\n```go\nfunc (c *Client) Project(id string) (*Project, error)\n```\nGet a project by id\n\n```go\nfunc (c *Client) Projects(page int, per_page int, hide_archives bool) ([]*Project, error)\n```\nGet a list of projects owned by the authenticated user.\n\n```go\nfunc (c *Client) RepoRawFile(id, sha, filepath string) ([]byte, error)\n```\nGet Raw file content\n\n```go\nfunc (c *Client) ResourceUrl(u string, params, query QMap) (string, string)\n```\n\n```go\nfunc (c *Client) SearchProjectId(namespace string, name string) (id int, err error)\n```\nGet a list of projects by query owned by the authenticated user.\n\n```go\nfunc (c *Client) SetStatus(id, sha, state, desc, ref, link string) error\n```\n\n```go\ntype GroupAccess struct {\n\tAccessLevel       int `json:\"access_level,omitempty\"`\n\tNotificationLevel int `json:\"notification_level,omitempty\"`\n}\n```\n\n```go\ntype HookObjAttr struct {\n\tId              int       `json:\"id,omitempty\"`\n\tTitle           string    `json:\"title,omitempty\"`\n\tAssigneeId      int       `json:\"assignee_id,omitempty\"`\n\tAuthorId        int       `json:\"author_id,omitempty\"`\n\tProjectId       int       `json:\"project_id,omitempty\"`\n\tCreatedAt       string    `json:\"created_at,omitempty\"`\n\tUpdatedAt       string    `json:\"updated_at,omitempty\"`\n\tPosition        int       `json:\"position,omitempty\"`\n\tBranchName      string    `json:\"branch_name,omitempty\"`\n\tDescription     string    `json:\"description,omitempty\"`\n\tMilestoneId     int       `json:\"milestone_id,omitempty\"`\n\tState           string    `json:\"state,omitempty\"`\n\tIId             int       `json:\"iid,omitempty\"`\n\tTargetBranch    string    `json:\"target_branch,omitempty\"`\n\tSourceBranch    string    `json:\"source_branch,omitempty\"`\n\tSourceProjectId int       `json:\"source_project_id,omitempty\"`\n\tStCommits       string    `json:\"st_commits,omitempty\"`\n\tStDiffs         string    `json:\"st_diffs,omitempty\"`\n\tMergeStatus     string    `json:\"merge_status,omitempty\"`\n\tTargetProjectId int       `json:\"target_project_id,omitempty\"`\n\tUrl             string    `json:\"url,omiyempty\"`\n\tSource          *hProject `json:\"source,omitempty\"`\n\tTarget          *hProject `json:\"target,omitempty\"`\n\tLastCommit      *hCommit  `json:\"last_commit,omitempty\"`\n}\n```\n\n```go\ntype HookPayload struct {\n\tBefore            string       `json:\"before,omitempty\"`\n\tAfter             string       `json:\"after,omitempty\"`\n\tRef               string       `json:\"ref,omitempty\"`\n\tUserId            int          `json:\"user_id,omitempty\"`\n\tUserName          string       `json:\"user_name,omitempty\"`\n\tProjectId         int          `json:\"project_id,omitempty\"`\n\tProject           *hProject    `json:\"project,omitempty\"`\n\tRepository        *hRepository `json:\"repository,omitempty\"`\n\tCommits           []hCommit    `json:\"commits,omitempty\"`\n\tTotalCommitsCount int          `json:\"total_commits_count,omitempty\"`\n\tObjectKind        string       `json:\"object_kind,omitempty\"`\n\tObjectAttributes  *HookObjAttr `json:\"object_attributes,omitempty\"`\n}\n```\n\n```go\nfunc ParseHook(payload []byte) (*HookPayload, error)\n```\nParseHook parses hook payload from GitLab\n\n```go\nfunc (h *HookPayload) Branch() string\n```\nBranch returns current branch for push event hook payload This function returns empty string for any other events\n\n```go\nfunc (h *HookPayload) Head() hCommit\n```\nHead returns the latest changeset for push event hook payload\n\n```go\nfunc (h *HookPayload) Tag() string\n```\nTag returns current tag for push event hook payload This function returns empty string for any other events\n\n```go\ntype Member struct {\n\tId        int\n\tUsername  string\n\tEmail     string\n\tName      string\n\tState     string\n\tCreatedAt string `json:\"created_at,omitempty\"`\n}\n```\n\n```go\ntype Namespace struct {\n\tId   int    `json:\"id,omitempty\"`\n\tName string `json:\"name,omitempty\"`\n\tPath string `json:\"path,omitempty\"`\n}\n```\n\n```go\ntype Permissions struct {\n\tProjectAccess *ProjectAccess `json:\"project_access,omitempty\"`\n\tGroupAccess   *GroupAccess   `json:\"group_access,omitempty\"`\n}\n```\n\n```go\ntype Person struct {\n\tName  string `json:\"name\"`\n\tEmail string `json:\"email\"`\n}\n```\n\n```go\ntype Project struct {\n\tId                int          `json:\"id,omitempty\"`\n\tOwner             *Member      `json:\"owner,omitempty\"`\n\tName              string       `json:\"name,omitempty\"`\n\tDescription       string       `json:\"description,omitempty\"`\n\tDefaultBranch     string       `json:\"default_branch,omitempty\"`\n\tPublic            bool         `json:\"public,omitempty\"`\n\tPath              string       `json:\"path,omitempty\"`\n\tPathWithNamespace string       `json:\"path_with_namespace,omitempty\"`\n\tNamespace         *Namespace   `json:\"namespace,omitempty\"`\n\tSshRepoUrl        string       `json:\"ssh_url_to_repo\"`\n\tHttpRepoUrl       string       `json:\"http_url_to_repo\"`\n\tUrl               string       `json:\"web_url\"`\n\tAvatarUrl         string       `json:\"avatar_url\"`\n\tPermissions       *Permissions `json:\"permissions,omitempty\"`\n}\n```\n\n```go\ntype ProjectAccess struct {\n\tAccessLevel       int `json:\"access_level,omitempty\"`\n\tNotificationLevel int `json:\"notification_level,omitempty\"`\n}\n```\n\n```go\ntype QMap map[string]string\n```\n\n```go\ntype User struct {\n\tId        int    `json:\"id,omitempty\"`\n\tUsername  string `json:\"username,omitempty\"`\n\tEmail     string `json:\"email,omitempty\"`\n\tAvatarUrl string `json:\"avatar_url,omitempty\"`\n\tName      string `json:\"name,omitempty\"`\n}\n```\n\n","path":"github.com/coding/drone/remote/gitlab/client","name":"client","synopsis":"","isRedistributable":true}
