@@ -47,14 +47,9 @@ type RepositoryMainBranch struct {
47
47
Name * string `json:"name,omitempty"`
48
48
}
49
49
50
- // RepositoryCloneLinks represents a collection of repository clone links.
51
- type RepositoryCloneLinks struct {
52
- Values []* Link
53
- }
54
-
55
- // GetHTTPS get the HTTPS clone link. Returns empty string if not found.
56
- func (rcl * RepositoryCloneLinks ) GetHTTPS () string {
57
- for _ , link := range rcl .Values {
50
+ // GetHTTPSCloneURL get the HTTPS clone url. Returns empty string if not found.
51
+ func (rl * RepositoryLinks ) GetHTTPSCloneURL () string {
52
+ for _ , link := range rl .Clone {
58
53
if link .GetName () == "https" {
59
54
return link .GetHRef ()
60
55
}
@@ -63,9 +58,9 @@ func (rcl *RepositoryCloneLinks) GetHTTPS() string {
63
58
return ""
64
59
}
65
60
66
- // GetSSH get the SSH clone link . Returns empty string if not found.
67
- func (rcl * RepositoryCloneLinks ) GetSSH () string {
68
- for _ , link := range rcl . Values {
61
+ // GetSSHCloneURL get the SSH clone url . Returns empty string if not found.
62
+ func (rl * RepositoryLinks ) GetSSHCloneURL () string {
63
+ for _ , link := range rl . Clone {
69
64
if link .GetName () == "ssh" {
70
65
return link .GetHRef ()
71
66
}
@@ -76,18 +71,18 @@ func (rcl *RepositoryCloneLinks) GetSSH() string {
76
71
77
72
// RepositoryLinks represents the "links" object in a Bitbucket repository.
78
73
type RepositoryLinks struct {
79
- Clone RepositoryCloneLinks `json:"clone,omitempty"`
80
- Watchers * Link `json:"watchers,omitempty"`
81
- Branches * Link `json:"branches,omitempty"`
82
- Tags * Link `json:"tags,omitempty"`
83
- Commits * Link `json:"commits,omitempty"`
84
- Downloads * Link `json:"downloads,omitempty"`
85
- Source * Link `json:"source,omitempty"`
86
- HTML * Link `json:"html,omitempty"`
87
- Avatar * Link `json:"avatar,omitempty"`
88
- Forks * Link `json:"forks,omitempty"`
89
- Self * Link `json:"self,omitempty"`
90
- PullRequests * Link `json:"pull_requests,omitempty"`
74
+ Clone [] * Link `json:"clone,omitempty"`
75
+ Watchers * Link `json:"watchers,omitempty"`
76
+ Branches * Link `json:"branches,omitempty"`
77
+ Tags * Link `json:"tags,omitempty"`
78
+ Commits * Link `json:"commits,omitempty"`
79
+ Downloads * Link `json:"downloads,omitempty"`
80
+ Source * Link `json:"source,omitempty"`
81
+ HTML * Link `json:"html,omitempty"`
82
+ Avatar * Link `json:"avatar,omitempty"`
83
+ Forks * Link `json:"forks,omitempty"`
84
+ Self * Link `json:"self,omitempty"`
85
+ PullRequests * Link `json:"pull_requests,omitempty"`
91
86
}
92
87
93
88
// RepositoryListQueryParams represents the filters and query parameters available when listing repositories.
0 commit comments