bitbucket

package
v0.0.0-...-873fb03 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

* Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const (
	ZipUrlPattern       = "https://bitbucket.org/%s/%s/get/%s.zip"
	TagsUrlPattern      = "https://api.bitbucket.org/2.0/repositories/%s/%s/refs/tags"
	LatestTagUrlPattern = "https://api.bitbucket.org/2.0/repositories/%s/%s/refs/tags?sort=target.date"
)

Variables

This section is empty.

Functions

func NewRepoInfo

func NewRepoInfo(url string, token string) git.RepoInfo

NewRepoInfo returns the RepoInfo built by repository url Repository url e.g. https://bitbucket.org/{{owner}}/{{repo}}/src/master/

Types

type DefaultRepoInfo

type DefaultRepoInfo struct {
	// contains filtered or unexported fields
}

func (DefaultRepoInfo) LatestTagUrl

func (in DefaultRepoInfo) LatestTagUrl() string

LatestTagUrl returns the Bitbucket API URL for get latest tag release e.g. https://api.bitbucket.org/2.0/repositories/{{owner}}/{{repo}}/refs/tags?sort=target.date

func (DefaultRepoInfo) TagsUrl

func (in DefaultRepoInfo) TagsUrl() string

TagsUrl returns the Bitbucket API URL for get all tags e.g. https://api.bitbucket.org/2.0/repositories/{{owner}}/{{repo}}/refs/tags

func (DefaultRepoInfo) Token

func (in DefaultRepoInfo) Token() string

func (DefaultRepoInfo) TokenHeader

func (in DefaultRepoInfo) TokenHeader() string

TokenHeader returns the Authorization value formatted for Bitbucket API integration

func (DefaultRepoInfo) ZipUrl

func (in DefaultRepoInfo) ZipUrl(version string) string

ZipUrl returns the Bitbucket API URL for download zipball repository e.g. https://bitbucket.org/{{owner}}/{{repo}}/get/{{tag-version}}.zip

type RepoManager

type RepoManager struct {
	// contains filtered or unexported fields
}

func NewRepoManager

func NewRepoManager(client *http.Client) RepoManager

func (RepoManager) LatestTag

func (re RepoManager) LatestTag(info git.RepoInfo) (git.Tag, error)

func (RepoManager) Tags

func (re RepoManager) Tags(info git.RepoInfo) (git.Tags, error)

func (RepoManager) Zipball

func (re RepoManager) Zipball(info git.RepoInfo, version string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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