builder

package
v0.0.0-...-5ec74ad Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright 2019 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. 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.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Copyright 2019 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. 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.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBuildCtx

func InitBuildCtx(opts Opts) error

func NewService

func NewService()

NewService initializes a new service.

func SplitUrl

func SplitUrl(url string) (path, branch, subdir string)

Types

type FileSource

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

func (*FileSource) CodePath

func (s *FileSource) CodePath() string

func (*FileSource) Download

func (s *FileSource) Download() error

type GitSource

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

func (*GitSource) CodePath

func (g *GitSource) CodePath() string

func (*GitSource) Download

func (g *GitSource) Download() error

type Opts

type Opts struct {
	Verbose   []bool `short:"v" long:"verbose" description:"Show verbose debug information"`
	Source    string `short:"s" long:"source" description:"Source repo/path"`
	LocalPath string `short:"l" long:"local" description:"Local target path" required:"true"`
}

type SourceConfig

type SourceConfig struct {
	Source    string
	LocalPath string
	User      string
	Password  string
	// contains filtered or unexported fields
}

type SourceRepo

type SourceRepo interface {
	Download() error
	CodePath() string
}

func GetSourceRepo

func GetSourceRepo(cfg *SourceConfig) (SourceRepo, error)

func NewFileSource

func NewFileSource(cfg *SourceConfig) (SourceRepo, error)

func NewGitSource

func NewGitSource(u *url.URL, cfg *SourceConfig) (SourceRepo, error)

Jump to

Keyboard shortcuts

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