Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (x *Config) GetAuthOpts() *block.AuthOpts
- func (x *Config) GetCloneOpts() *block.CloneOpts
- func (c *Config) GetConfigID() string
- func (x *Config) GetObjectKey() string
- func (x *Config) GetWorktreeOpts() *world.GitCreateWorktreeOp
- func (c *Config) IsEmpty() bool
- func (c *Config) MarshalBlock() ([]byte, error)
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (c *Config) UnmarshalBlock(data []byte) error
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Controller
- func (c *Controller) Close() error
- func (c *Controller) Execute(ctx context.Context) error
- func (c *Controller) GetControllerInfo() *controller.Info
- func (c *Controller) HandleDirective(ctx context.Context, inst directive.Instance) ([]directive.Resolver, error)
- func (c *Controller) InitForgeExecController(ctx context.Context, inputVals forge_target.InputMap, ...) error
- type Factory
- func (t *Factory) Construct(ctx context.Context, conf config.Config, opts controller.ConstructOpts) (controller.Controller, error)
- func (t *Factory) ConstructConfig() config.Config
- func (t *Factory) GetConfigID() string
- func (t *Factory) GetControllerID() string
- func (t *Factory) GetVersion() semver.Version
Constants ¶
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "forge/lib/git/clone"
ControllerID is the ID of the controller.
Variables ¶
var Version = semver.MustParse("0.0.1")
Version is the version of the controller implementation.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ObjectKey is the object key to create as a Repo.
ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
// CloneOpts are the args for the clone operation.
CloneOpts *block.CloneOpts `protobuf:"bytes,2,opt,name=clone_opts,json=cloneOpts,proto3" json:"cloneOpts,omitempty"`
// AuthOpts applies authentication to the operations.
AuthOpts *block.AuthOpts `protobuf:"bytes,3,opt,name=auth_opts,json=authOpts,proto3" json:"authOpts,omitempty"`
// WorktreeOpts are options for creating the worktree.
// If cloneOpts.DisableCheckout is set, disables this step.
WorktreeOpts *world.GitCreateWorktreeOp `protobuf:"bytes,4,opt,name=worktree_opts,json=worktreeOpts,proto3" json:"worktreeOpts,omitempty"`
// contains filtered or unexported fields
}
Config is the configuration for cloning Git repositories to a world. If the target object already exists, skips the step.
Inputs:
- world: the target World engine or state.
Outputs:
- repo: snapshot of the Repository object.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the other config is equal.
func (*Config) GetAuthOpts ¶
func (*Config) GetCloneOpts ¶
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type. This string is stored with the encoded config.
func (*Config) GetObjectKey ¶
func (*Config) GetWorktreeOpts ¶
func (x *Config) GetWorktreeOpts() *world.GitCreateWorktreeOp
func (*Config) MarshalBlock ¶
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*Config) MarshalJSON ¶
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalBlock ¶
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller implements the git clone controller.
func NewController ¶
NewController constructs a new git clone controller.
func (*Controller) Close ¶
func (c *Controller) Close() error
Close releases any resources used by the controller. Error indicates any issue encountered releasing.
func (*Controller) Execute ¶
func (c *Controller) Execute(ctx context.Context) error
Execute executes the controller goroutine. Returning nil ends execution. Returning an error triggers a retry with backoff.
func (*Controller) GetControllerInfo ¶
func (c *Controller) GetControllerInfo() *controller.Info
GetControllerInfo returns information about the controller.
func (*Controller) HandleDirective ¶
func (c *Controller) HandleDirective(ctx context.Context, inst directive.Instance) ([]directive.Resolver, error)
HandleDirective asks if the handler can resolve the directive.
func (*Controller) InitForgeExecController ¶
func (c *Controller) InitForgeExecController( ctx context.Context, inputVals forge_target.InputMap, handle forge_target.ExecControllerHandle, ) error
InitForgeExecController initializes the Forge execution controller. This is called before Execute(). Any error returned cancels execution of the controller.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs a git clone controller.
func (*Factory) Construct ¶
func (t *Factory) Construct( ctx context.Context, conf config.Config, opts controller.ConstructOpts, ) (controller.Controller, error)
Construct constructs the associated controller given configuration.
func (*Factory) ConstructConfig ¶
ConstructConfig constructs an instance of the controller configuration.
func (*Factory) GetConfigID ¶
GetConfigID returns the configuration ID for the controller.
func (*Factory) GetControllerID ¶
GetControllerID returns the unique ID for the controller.
func (*Factory) GetVersion ¶
GetVersion returns the version of this controller.