Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) EqualVT(other *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (c *Config) GetCommitRequest() *s4wave_git.CommitFilesRequest
- func (c *Config) GetConfigID() string
- func (c *Config) GetRepoObjectKey() string
- func (c *Config) GetWorktreeObjectKey() string
- func (c *Config) IsEmpty() bool
- func (c *Config) MarshalBlock() ([]byte, error)
- func (c *Config) MarshalJSON() ([]byte, error)
- func (c *Config) MarshalProtoJSON(s *json.MarshalState)
- func (c *Config) MarshalToSizedBufferVT(dst []byte) (int, error)
- func (c *Config) MarshalVT() ([]byte, error)
- func (*Config) ProtoMessage()
- func (c *Config) Reset()
- func (c *Config) SizeVT() int
- func (c *Config) UnmarshalBlock(data []byte) error
- func (c *Config) UnmarshalJSON(data []byte) error
- func (c *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (c *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() controller.Version
Constants ¶
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "forge/lib/git/commit"
ControllerID is the ID of the controller.
Variables ¶
var Version = controller.MustParseVersion("0.0.1")
Version is the version of the controller implementation.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// WorktreeObjectKey is the git/worktree object to commit from.
WorktreeObjectKey string `json:"worktreeObjectKey,omitempty"`
// RepoObjectKey is the linked git/repo object that owns the index.
RepoObjectKey string `json:"repoObjectKey,omitempty"`
// CommitRequest describes the staged paths and commit identity.
CommitRequest *s4wave_git.CommitFilesRequest `json:"commitRequest,omitempty"`
}
Config is the configuration for committing staged Git Worktree files.
func (*Config) EqualsConfig ¶
EqualsConfig checks if the other config is equal.
func (*Config) GetCommitRequest ¶
func (c *Config) GetCommitRequest() *s4wave_git.CommitFilesRequest
GetCommitRequest returns the commit request.
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type. This string is stored with the encoded config.
func (*Config) GetRepoObjectKey ¶
GetRepoObjectKey returns the Repo object key.
func (*Config) GetWorktreeObjectKey ¶
GetWorktreeObjectKey returns the Worktree object key.
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 (c *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalToSizedBufferVT ¶
MarshalToSizedBufferVT marshals into a sized buffer.
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
ProtoMessage marks Config as a protobuf-like message.
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 (c *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
UnmarshalVT unmarshals the config.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller implements the git commit controller.
func NewController ¶
NewController constructs a new git commit 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 commit 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 ¶
func (t *Factory) GetVersion() controller.Version
GetVersion returns the version of this controller.