services

package
v0.0.0-...-d6e8d26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddError

func AddError(c *gin.Context, message string)

func AddMessage

func AddMessage(c *gin.Context, message string)

func AddWarning

func AddWarning(c *gin.Context, message string)

func DiggerJobCompleted

func DiggerJobCompleted(client *github.Client, batchId *uuid.UUID, parentJob *models.DiggerJob, repoFullName string, repoOwner string, repoName string, workflowFileName string, gh utils.GithubClientProvider) error

func GetMessages

func GetMessages(c *gin.Context) map[string]any

func GetRunNameFromJob

func GetRunNameFromJob(job models.DiggerJob) (*string, error)

func GetSpecFromJob

func GetSpecFromJob(job models.DiggerJob) (*spec.Spec, error)

func GetVCSTokenFromJob

func GetVCSTokenFromJob(job models.DiggerJob, gh utils.GithubClientProvider) (*string, error)

func ScheduleJob

func ScheduleJob(ciBackend ci_backends.CiBackend, repoFullname string, repoOwner string, repoName string, batchId *uuid.UUID, job *models.DiggerJob, gh utils.GithubClientProvider) error

func TriggerJob

func TriggerJob(gh utils.GithubClientProvider, ciBackend ci_backends.CiBackend, repoFullname string, repoOwner string, repoName string, batchId *uuid.UUID, job *models.DiggerJob) error

Types

type Auth

type Auth struct {
	HttpClient http.Client
	Host       string
	Secret     string
	ClientId   string
	// contains filtered or unexported fields
}

func (*Auth) FetchTokenPermissions

func (a *Auth) FetchTokenPermissions(tokenId string) ([]string, error)

type TokenClaims

type TokenClaims struct {
	Id          string   `json:"id"`
	TenantId    string   `json:"tenantId"`
	Permissions []string `json:"permissions"`
	Roles       []string `json:"roles"`
	Expires     string   `json:"expires"`
}

type TokenResponse

type TokenResponse struct {
	Token     string `json:"token"`
	ExpiresIn int64  `json:"expiresIn"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL