service

package
v0.55.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upsert added in v0.44.0

func Upsert(svc Service, entity modelAPI.Entity) error

func UpsertWithProjectCreation added in v0.55.0

func UpsertWithProjectCreation(apiClient api.ClientInterface, kind modelV1.Kind, project string, entity modelAPI.Entity, createProject bool) error

UpsertWithProjectCreation behaves like Upsert, except that, when createProject is true and the upsert fails because the target project doesn't exist, it will create the project and retry the upsert once.

Types

type Service

type Service interface {
	CreateResource(entity modelAPI.Entity) (modelAPI.Entity, error)
	UpdateResource(entity modelAPI.Entity) (modelAPI.Entity, error)
	ListResource(prefix string) ([]modelAPI.Entity, error)
	GetResource(name string) (modelAPI.Entity, error)
	DeleteResource(name string) error
	BuildMatrix(hits []modelAPI.Entity) [][]string
	GetColumHeader() []string
}

func New

func New(kind modelV1.Kind, projectName string, apiClient api.ClientInterface) (Service, error)

Jump to

Keyboard shortcuts

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