checkpoint

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmeApiVersion = "v1.3.1"
	CmeApiPath    = "cme-api/" + CmeApiVersion
)
View Source
const (
	DefaultSessionFilename = "sid.json"
)

Variables

This section is empty.

Functions

func CheckSession

func CheckSession(c *checkpoint.ApiClient, uid string) bool

func Compare

func Compare(a, b []string) []string

func Provider

func Provider() *schema.Provider

func TaskMessageFromAny added in v3.2.0

func TaskMessageFromAny(data map[string]interface{}) string

TaskMessageFromAny pulls a human message if present.

func TaskStatusFromAny added in v3.2.0

func TaskStatusFromAny(data map[string]interface{}) string

TaskStatusFromAny extracts tasks[0].status (lowercased), or "" if missing.

Types

type Session

type Session struct {
	Sid string `json:"sid"`
	Uid string `json:"uid"`
}

func GetSession

func GetSession(sessionFileName string) (Session, error)

func (*Session) Save

func (s *Session) Save(sessionFileName string) error

type TaskResult added in v3.2.0

type TaskResult struct {
	TaskID    string
	Status    string // "succeeded","failed","timeout","inline","queued","unknown"
	Message   string // best-effort message or pretty JSON from task-details
	Completed bool
	Polled    bool
}

func HandleTaskCreate added in v3.2.0

func HandleTaskCreate(
	ctx context.Context,
	client *checkpoint.ApiClient,
	command string,
	apiRes checkpoint.APIResponse,
	poll bool,
	timeout time.Duration,
) (TaskResult, error)

HandleTaskCreate runs a create-like command that may return a task and (optionally) polls it. Returns TaskResult describing the outcome; error is only for transport/SDK issues.

func (TaskResult) IsSuccess added in v3.2.0

func (r TaskResult) IsSuccess() bool

IsSuccess is a convenience for callers.

Source Files

Jump to

Keyboard shortcuts

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