util

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL = "https://hive-api.cvedb.khulnasoft.com/"
)

Variables

View Source
var (
	Cfg = types.Config{
		BaseUrl: BaseURL,
	}
	SpaceName    string
	ProjectName  string
	WorkflowName string
	URL          string
)

Functions

func CreateRequest

func CreateRequest()

func DownloadFile

func DownloadFile(url, outputDir, fileName string) error

func FormatDuration

func FormatDuration(duration time.Duration) string

func FormatPath

func FormatPath() string

func GetCategoryIDByName

func GetCategoryIDByName(name string) (uuid.UUID, error)

func GetFleetInfo

func GetFleetInfo(fleetName string) *types.Fleet

func GetMe

func GetMe() *types.User

func GetObjects

func GetObjects(args []string) (*types.SpaceDetailed, *types.Project, *types.Workflow, bool)

GetObjects handles different input scenarios for retrieving platform objects.

Examples:

func GetRunIDFromWorkflowURL

func GetRunIDFromWorkflowURL(workflowURL string) (string, error)

func GetSpaceByName

func GetSpaceByName(name string) *types.SpaceDetailed

func GetSpaces

func GetSpaces(name string) []types.Space

func GetToken

func GetToken() string

func GetVault

func GetVault() uuid.UUID

func GetWorkflowByID

func GetWorkflowByID(id uuid.UUID) *types.Workflow

func GetWorkflows

func GetWorkflows(projectID, spaceID uuid.UUID, search string, library bool) []types.Workflow

func ResolveObjectPath

func ResolveObjectPath(path string, silent bool) (*types.SpaceDetailed, *types.Project, *types.Workflow, bool)

func ResolveObjectURL

func ResolveObjectURL(objectURL string) (*types.SpaceDetailed, *types.Project, *types.Workflow, bool)

func SearchLibraryCategories

func SearchLibraryCategories(name string) ([]types.Category, error)

Types

type UnexpectedResponse

type UnexpectedResponse map[string]interface{}

Jump to

Keyboard shortcuts

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