cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 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 Deploy

func Deploy(url string, functionInput string, functionName string, insecure bool, pcrSlice []string) (string, []byte, 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 Run

func Run(url string, functionID string, file string, insecure bool) ([]byte, error)

This function is exported for tuner to use.

func Test

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

func Token

func Token(functionID string, expires int) (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 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 ErrorMsg

type ErrorMsg struct {
	Error string `json:"error"`
}

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

type UserResponse

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

Jump to

Keyboard shortcuts

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