fn

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	Name      string        `arg:"" name:"name" help:"name of the function to create"`
	Namespace string        `name:"namespace" short:"n" help:"namespace of the function to create"`
	Source    string        `name:"source" required:"" short:"s" help:"path of the source file"`
	Language  string        `name:"language" required:"" short:"l" help:"programming language of the function"`
	FS        fs.ReadFileFS `kong:"-"`
}

func (*Create) Run

func (f *Create) Run(ctx context.Context, invoker client.FnHandler, logger log.FLogger) error

type Delete

type Delete struct {
	Name      string `arg:"" name:"name" help:"name of the function to delete"`
	Namespace string `name:"namespace" short:"n" help:"namespace of the function to delete"`
}

func (*Delete) Run

func (f *Delete) Run(ctx context.Context, invoker client.FnHandler, logger log.FLogger) error

type Fn

type Fn struct {
	Invoke Invoke `cmd:"" help:"todo fn invoke help"`
	Create Create `cmd:"" help:"todo fn create help"`
	Delete Delete `cmd:"" help:"todo fn delete help"`
}

type Invoke

type Invoke struct {
	Name      string            `arg:"" name:"name" help:"name of the function to invoke"`
	Namespace string            `name:"namespace" short:"n" help:"namespace of the function to invoke"`
	Args      map[string]string `name:"args" short:"a" help:"arguments of the function to invoke" xor:"args"`
	JsonArgs  string            `name:"json" short:"j" help:"json encoded arguments of the function to invoke; overrides args" xor:"args"`
}

func (*Invoke) Run

func (f *Invoke) Run(ctx context.Context, invoker client.FnHandler, logger log.FLogger) error

Jump to

Keyboard shortcuts

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