Documentation ¶
Index ¶
- Variables
- func AddWorkflowLevelPermissions(inputYaml string) (string, error)
- type Action
- type ActionInput
- type ActionMetadata
- type ActionPermissions
- type ActionScopePermission
- type ActionScopePermissions
- type Actions
- type AllowedEndpoint
- type Env
- type GitHubContent
- type GitHubToken
- type Job
- type JobError
- type JobState
- type Jobs
- type Permission
- type Permissions
- type SecureWorkflowReponse
- type Step
- type With
- type Workflow
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidValue = errors.New("invalid value for field 'permissions'")
Functions ¶
Types ¶
type Action ¶
type Action struct { Name string `yaml:"name"` DefaultToken string `yaml:"default-token"` EnvKey string `yaml:"env-key"` Permissions Permissions `yaml:"permissions"` }
type ActionInput ¶
type ActionMetadata ¶
type ActionMetadata struct { Name string `yaml:"name"` GitHubToken GitHubToken `yaml:"github-token"` AllowedEndpoints []AllowedEndpoint `yaml:"outbound-endpoints"` }
func GetActionKnowledgeBase ¶
func GetActionKnowledgeBase(action string) (*ActionMetadata, error)
type ActionPermissions ¶
type ActionPermissions struct {
Actions Actions `yaml:"actions"`
}
type ActionScopePermission ¶
type ActionScopePermissions ¶
type ActionScopePermissions struct {
Scopes map[string]ActionScopePermission
}
func (*ActionScopePermissions) UnmarshalYAML ¶
func (p *ActionScopePermissions) UnmarshalYAML(unmarshal func(interface{}) error) error
type AllowedEndpoint ¶
type GitHubContent ¶
type GitHubContent struct {
Content string `json:"content"`
}
type GitHubToken ¶
type GitHubToken struct { ActionInput ActionInput `yaml:"action-input"` EnvironmentVariableName string `yaml:"environment-variable-name"` Permissions ActionScopePermissions `yaml:"permissions"` }
type Job ¶
type Job struct { Permissions Permissions `yaml:"permissions"` // RunsOn []string `yaml:"runs-on"` Steps []Step `yaml:"steps"` }
type Permission ¶
type Permission struct {
// contains filtered or unexported fields
}
type Permissions ¶
func (*Permissions) UnmarshalYAML ¶
func (p *Permissions) UnmarshalYAML(unmarshal func(interface{}) error) error
type SecureWorkflowReponse ¶
type SecureWorkflowReponse struct { FinalOutput string IsChanged bool HasErrors bool AlreadyHasPermissions bool IncorrectYaml bool JobErrors []JobError MissingActions []string }
func AddJobLevelPermissions ¶
func AddJobLevelPermissions(inputYaml string) (*SecureWorkflowReponse, error)
type Workflow ¶
type Workflow struct { Name string `yaml:"name"` Permissions Permissions `yaml:"permissions"` // On string `yaml:"on"` Jobs Jobs `yaml:"jobs"` }
Click to show internal directories.
Click to hide internal directories.