server

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExpiredSession = fmt.Errorf("your session has expired, please login again using `pennywise login`")

Functions

func CheckExpirationTime

func CheckExpirationTime(accessToken string) (bool, error)

func RemoveConfig

func RemoveConfig() error

func SetConfig

func SetConfig(data Config) error

Types

type Config

type Config struct {
	AccessToken      string `json:"access-token"`
	DefaultWorkspace string `json:"default_workspace"`
}

func GetConfig added in v1.8.0

func GetConfig() (*Config, error)

type EchoError

type EchoError struct {
	Message string `json:"message"`
}

type ServerClient

type ServerClient interface {
	GetStateCost(req schema.Submission) (*cost.State, error)
	GetStateCostV2(req schema.SubmissionV2) (*cost.ModularState, error)
	AddIngestion(provider, service, region string) (*schema.IngestionJob, error)
	ListIngestionJobs(provider, service, region, status string) ([]schema.IngestionJob, error)
	GetIngestionJob(id string) (*schema.IngestionJob, error)
	ListServices(provider string) ([]string, error)
	GetSubmissionsDiff(req schema.SubmissionsDiff) (*schema.StateDiff, error)
	GetSubmissionsDiffV2(req schema.SubmissionsDiffV2) (*schema.ModularStateDiff, error)
}

func NewPennywiseServerClient

func NewPennywiseServerClient(baseURL string) (ServerClient, error)

Jump to

Keyboard shortcuts

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