-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathBuildahSource.Generated.cs
More file actions
110 lines (98 loc) · 4.77 KB
/
BuildahSource.Generated.cs
File metadata and controls
110 lines (98 loc) · 4.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// <auto-generated>
// This file was generated by ModularPipelines.OptionsGenerator.
// Do not edit this file manually.
// </auto-generated>
#nullable enable
using System.CodeDom.Compiler;
using ModularPipelines.Context;
using ModularPipelines.Models;
using ModularPipelines.Options;
using ModularPipelines.Buildah.Options;
namespace ModularPipelines.Buildah.Services;
/// <summary>
/// buildah source commands.
/// </summary>
[GeneratedCode("ModularPipelines.OptionsGenerator", "")]
public class BuildahSource
{
private readonly ICommand _command;
/// <summary>
/// Initializes a new instance of the <see cref="BuildahSource"/> class.
/// </summary>
public BuildahSource(ICommand command)
{
_command = command;
}
#region Commands
/// <summary>
/// Create, push, pull and manage source images and associated source artifacts. A source image contains all source artifacts an ordinary OCI image has been built with. Those artifacts can be any kind of source artifact, such as source RPMs, an entire source tree or text files.
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Execute(
BuildahSourceOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new BuildahSourceOptions(), executionOptions, cancellationToken);
}
/// <summary>
/// Add add a source artifact to a source image. The artifact will be added as a gzip-compressed tar ball. Add attempts to auto-tar and auto-compress only if necessary.
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Add(
BuildahSourceAddOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new BuildahSourceAddOptions(), executionOptions, cancellationToken);
}
/// <summary>
/// Create and initialize a source image. A source image is an OCI artifact; an OCI image with a custom config media type.
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Create(
BuildahSourceCreateOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new BuildahSourceCreateOptions(), executionOptions, cancellationToken);
}
/// <summary>
/// Pull a source image from a registry to a specified path. The pull operation will fail if the image does not comply with a source-image OCI artifact.
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Pull(
BuildahSourcePullOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new BuildahSourcePullOptions(), executionOptions, cancellationToken);
}
/// <summary>
/// Push a source image from a specified path to a registry.
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Push(
BuildahSourcePushOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new BuildahSourcePushOptions(), executionOptions, cancellationToken);
}
#endregion
}