Documentation ¶
Overview ¶
Copyright 2018 jsonnet-bundler authors
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 2018 jsonnet-bundler authors ¶
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 ¶
const ( GitSchemeSSH = "ssh://git@" GitSchemeHTTPS = "https://" )
Variables ¶
var ( VersionRegex = `@(?P<version>.*)` PathRegex = `/(?P<subdir>.*)` PathAndVersionRegex = `/(?P<subdir>.*)@(?P<version>.*)` )
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { Source Source `json:"source"` Version string `json:"version"` Sum string `json:"sum,omitempty"` Single bool `json:"single,omitempty"` // older schema used to have `name`. We still need that data for // `LegacyName` LegacyNameCompat string `json:"name,omitempty"` }
func Parse ¶
func Parse(dir, uri string) *Dependency
func (Dependency) LegacyName ¶
func (d Dependency) LegacyName() string
func (Dependency) Name ¶
func (d Dependency) Name() string
type Git ¶
type Git struct { // Scheme (Protocol) used (https, git+ssh) Scheme string // Hostname the repo is located at Host string // User (example.com/<user>) User string // Repo (example.com/<user>/<repo>) Repo string // Subdir (example.com/<user>/<repo>/<subdir>) Subdir string }
Git holds all required information for cloning a package from git
func (*Git) LegacyName ¶
LegacyName returns the last element of the packages path example: github.com/ksonnet/ksonnet-lib/ksonnet.beta.4 becomes ksonnet.beta.4
func (*Git) MarshalJSON ¶
MarshalJSON takes care of translating between Git and jsonGit
func (*Git) UnmarshalJSON ¶
UnmarshalJSON takes care of translating between Git and jsonGit