helpers

package
v0.0.0-...-1bd0b79 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOnlyURLOrUUID = errors.New("either buildURL or buildUUID variable must be used, but not both")
	ErrWrongType     = errors.New("received unexpected type while trying to convert node to *ent.BazelInvocationProblem")
)

Error helpers.

Functions

func BlobReferenceForFile

func BlobReferenceForFile(ctx context.Context, db *ent.Client, fileLookup FileLookup) (*model.BlobReference, error)

BlobReferenceForFile Blob Reference for File function.

func GetAction

func GetAction(ctx context.Context, problem *ent.BazelInvocationProblem) (*bes.ActionExecuted, error)

GetAction Get an Action.

func GetFloatPointer

func GetFloatPointer(f *float64) *float64

GetFloatPointer returns a pointer to a float

func GetInt64Pointer

func GetInt64Pointer(i *int64) *int64

GetInt64Pointer returns a pointer to an int64

func GetTestResultActionLogOutput

func GetTestResultActionLogOutput(ctx context.Context, client *ent.Client, obj *model.TestResult) (*model.BlobReference, error)

GetTestResultActionLogOutput Get test result action log output.

func GetTestResultUndeclaredTestOutputs

func GetTestResultUndeclaredTestOutputs(ctx context.Context, client *ent.Client, obj *model.TestResult) (*model.BlobReference, error)

GetTestResultUndeclaredTestOutputs Get Test result test outputs.

func GraphQLIDFromTypeAndID

func GraphQLIDFromTypeAndID(objType string, id int) string

GraphQLIDFromTypeAndID Takes an id and returns the b64enc string.

func GraphQLTypeAndIntIDFromID

func GraphQLTypeAndIntIDFromID(id string) (string, int, error)

GraphQLTypeAndIntIDFromID ID Decoder helper

func StringSliceArrayToPointerArray

func StringSliceArrayToPointerArray(strings []string) []*string

StringSliceArrayToPointerArray takes an array of strings and returns an array of string pointers

Types

type FileLookup

type FileLookup func(ctx context.Context) (*bes.File, error)

FileLookup A file lookup type.

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

Helper A Helper struct.

func NewHelper

func NewHelper() *Helper

NewHelper Initializer for helper

func (Helper) DBProblemToAPIProblem

func (ph Helper) DBProblemToAPIProblem(ctx context.Context, problem *ent.BazelInvocationProblem) (model.Problem, error)

DBProblemToAPIProblem Convert a DB problem to an API problem.

func (Helper) DBProblemsToAPIProblems

func (ph Helper) DBProblemsToAPIProblems(ctx context.Context, dbProblems []*ent.BazelInvocationProblem) ([]model.Problem, error)

DBProblemsToAPIProblems Convert db problem to api problem.

Jump to

Keyboard shortcuts

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