cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Config

func Config(cmd *cobra.Command, args []string) error

func ExecuteCLI

func ExecuteCLI()

ExecuteCLI adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetKeyRequest added in v0.2.0

func GetKeyRequest(pcrSlice []string) (sdk.KeyRequest, error)

func Run

func Run(url string, auth entities.FunctionAuth, functionID string, file string, insecure bool) ([]byte, error)

TODO: This function is exported for tuner to use. Remove once tuner is using sdk.Run directly

func Test

func Test(cmd *cobra.Command, args []string) error

func Token

func Token(issuer string, functionID string, expires int, owner bool) (string, error)

func UpdateConfigFileJSON

func UpdateConfigFileJSON(jsonFile string, key string, value string) error

Types

type AttestationResponse

type AttestationResponse struct {
	AttestationDoc string `json:"attestation_doc"`
}

type DeployResponse

type DeployResponse struct {
	ID string `json:"id"`
}

type DeploymentName added in v0.2.1

type DeploymentName struct {
	ID        string
	Name      string
	CreatedAt string
}

type DeviceCodeResponse

type DeviceCodeResponse struct {
	VerificationURIComplete string `json:"verification_uri_complete"`
	UserCode                string `json:"user_code"`
	DeviceCode              string `json:"device_code"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
}

type ErrorRunResponse

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

type Message

type Message struct {
	Type    string `json:"type"`
	Message []byte `json:"message"`
}

type OversizeFunctionError

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

func (OversizeFunctionError) Error

func (e OversizeFunctionError) Error() string

type PlainFormatter

type PlainFormatter struct{}

func (*PlainFormatter) Format

func (f *PlainFormatter) Format(entry *log.Entry) ([]byte, error)

type PublicKeyRequest

type PublicKeyRequest struct {
	FunctionTokenPublicKey string `json:"function_token_pk"`
}

type RunResponse

type RunResponse struct {
	Type    string `json:"type"`
	Message []byte `json:"message"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	IDToken      string `json:"id_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

type UserError

type UserError struct {
	Msg string
	Err error
}

func (UserError) Error

func (e UserError) Error() string

Jump to

Keyboard shortcuts

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