Documentation
¶
Index ¶
- Constants
- func ApkBuild() *cobra.Command
- func Build() *cobra.Command
- func BuildCmd(ctx context.Context, archs []apko_types.Architecture, baseOpts ...build.Option) error
- func Bump() *cobra.Command
- func Compile() *cobra.Command
- func CompileCmd(ctx context.Context, opts ...build.Option) error
- func Completion() *cobra.Command
- func Convert() *cobra.Command
- func Diff(oldName string, old []byte, newName string, new []byte, comments bool) []byte
- func GemBuild() *cobra.Command
- func Index() *cobra.Command
- func IndexCmd(ctx context.Context, opts ...index.Option) error
- func Keygen() *cobra.Command
- func KeygenCmd(ctx context.Context, opts ...KeygenOption) error
- func Lint() *cobra.Command
- func New() *cobra.Command
- func PackageVersion() *cobra.Command
- func PythonBuild() *cobra.Command
- func Query() *cobra.Command
- func QueryCmd(ctx context.Context, configFile, pattern string) error
- func Scan() *cobra.Command
- func Sign() *cobra.Command
- func SignIndex() *cobra.Command
- func Test() *cobra.Command
- func TestCmd(ctx context.Context, archs []apko_types.Architecture, ...) error
- func UpdateCache() *cobra.Command
- type KeygenContext
- type KeygenOption
- type LintOpts
Constants ¶
const BuiltinPipelineDir = "/usr/share/melange/pipelines"
Variables ¶
This section is empty.
Functions ¶
func BuildCmd ¶
func BuildCmd(ctx context.Context, archs []apko_types.Architecture, baseOpts ...build.Option) error
func Completion ¶ added in v0.3.0
func Diff ¶ added in v0.7.0
Diff returns an anchored diff of the two texts old and new in the “unified diff” format. If old and new are identical, Diff returns a nil slice (no output).
Unix diff implementations typically look for a diff with the smallest number of lines inserted and removed, which can in the worst case take time quadratic in the number of lines in the texts. As a result, many implementations either can be made to run for a long time or cut off the search after a predetermined amount of work.
In contrast, this implementation looks for a diff with the smallest number of “unique” lines inserted and removed, where unique means a line that appears just once in both old and new. We call this an “anchored diff” because the unique lines anchor the chosen matching regions. An anchored diff is usually clearer than a standard diff, because the algorithm does not try to reuse unrelated blank lines or closing braces. The algorithm also guarantees to run in O(n log n) time instead of the standard O(n²) time.
Some systems call this approach a “patience diff,” named for the “patience sorting” algorithm, itself named for a solitaire card game. We avoid that name for two reasons. First, the name has been used for a few different variants of the algorithm, so it is imprecise. Second, the name is frequently interpreted as meaning that you have to wait longer (to be patient) for the diff, meaning that it is a slower algorithm, when in fact the algorithm is faster than the standard one.
func GemBuild ¶ added in v0.3.0
GemBuild is the top-level `convert gem` cobra command
TODO: add a --version flag to switch the version of the gem
func Index ¶ added in v0.2.0
Index is a constructor for a cobra.Command which wraps the IndexCmd function.
func IndexCmd ¶ added in v0.2.0
IndexCmd is the backend implementation of the "melange index" command.
func PackageVersion ¶ added in v0.3.0
func PythonBuild ¶ added in v0.3.0
PythonBuild is the top-level `convert python` cobra command
func SignIndex ¶
SignIndex is a constructor that returns a cobra.Command which wraps the SignIndexCmd() function.
func TestCmd ¶ added in v0.5.4
func TestCmd(ctx context.Context, archs []apko_types.Architecture, baseOpts ...build.TestOption) error
func UpdateCache ¶ added in v0.2.0
UpdateCache is a constructor for a cobra.Command which provides the "melange update-cache" command.
Types ¶
type KeygenContext ¶
func (*KeygenContext) GenerateKeypair ¶
func (kc *KeygenContext) GenerateKeypair() (*rsa.PrivateKey, *rsa.PublicKey, error)
type KeygenOption ¶
type KeygenOption func(*KeygenContext) error