codeconfig

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(p *project.Project, envMap map[string]string) (*codeConfig, error)

Types

type Api

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

func (*Api) AddSecurity added in v1.4.0

func (a *Api) AddSecurity(name string, scopes []string)

func (*Api) AddSecurityDefinition added in v1.4.0

func (a *Api) AddSecurityDefinition(name string, sd *v1.ApiSecurityDefinition)

func (*Api) AddWorker

func (a *Api) AddWorker(worker *v1.ApiWorker) error

func (*Api) String

func (a *Api) String() string

type BucketNotification added in v1.18.0

type BucketNotification struct {
	Bucket                   string `json:"bucket,omitempty"`
	NotificationType         string `json:"notificationType,omitempty"`
	NotificationPrefixFilter string `json:"notificationPrefixFilter,omitempty"`
}

type FunctionDependencies

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

FunctionDependencies - Stores information about a Nitric Function, and it's dependencies

func NewFunction

func NewFunction(name string) *FunctionDependencies

NewFunction - creates a new Nitric Function, ready to register handlers and dependencies.

func (*FunctionDependencies) AddApiHandler

func (a *FunctionDependencies) AddApiHandler(aw *v1.ApiWorker) error

func (*FunctionDependencies) AddApiSecurity added in v1.4.0

func (a *FunctionDependencies) AddApiSecurity(name string, security map[string]*v1.ApiScopes)

func (*FunctionDependencies) AddApiSecurityDefinitions added in v1.4.0

func (a *FunctionDependencies) AddApiSecurityDefinitions(name string, sds map[string]*v1.ApiSecurityDefinition)

func (*FunctionDependencies) AddBucket

func (a *FunctionDependencies) AddBucket(name string, b *v1.BucketResource)

AddBucket - adds a storage bucket dependency to the function

func (*FunctionDependencies) AddBucketNotificationHandler added in v1.18.0

func (a *FunctionDependencies) AddBucketNotificationHandler(nw *v1.BucketNotificationWorker) error

func (*FunctionDependencies) AddCollection

func (a *FunctionDependencies) AddCollection(name string, c *v1.CollectionResource)

AddCollection - adds a document database collection dependency to the function

func (*FunctionDependencies) AddPolicy

func (a *FunctionDependencies) AddPolicy(p *v1.PolicyResource)

AddPolicy - Adds an access policy dependency to the function

func (*FunctionDependencies) AddQueue

func (a *FunctionDependencies) AddQueue(name string, q *v1.QueueResource)

AddQueue - adds a queue dependency to the function

func (*FunctionDependencies) AddScheduleHandler

func (a *FunctionDependencies) AddScheduleHandler(sw *v1.ScheduleWorker) error

AddScheduleHandler - registers a handler in the function that runs on a schedule

func (*FunctionDependencies) AddSecret added in v1.1.0

func (a *FunctionDependencies) AddSecret(name string, s *v1.SecretResource)

func (*FunctionDependencies) AddSubscriptionHandler

func (a *FunctionDependencies) AddSubscriptionHandler(sw *v1.SubscriptionWorker) error

AddSubscriptionHandler - registers a handler in the function that subscribes to a topic of events

func (*FunctionDependencies) AddTopic

func (a *FunctionDependencies) AddTopic(name string, t *v1.TopicResource)

AddTopic - adds a pub/sub topic dependency to the function

func (*FunctionDependencies) WorkerCount added in v1.2.0

func (a *FunctionDependencies) WorkerCount() int

type Server

type Server struct {
	v1.UnimplementedFaasServiceServer
	v1.UnimplementedResourceServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(name string, function *FunctionDependencies) *Server

NewServer - Creates a new deployment server

func (*Server) Declare

Declare - Accepts resource declarations, adding them as dependencies to the Function

func (*Server) TriggerStream

func (s *Server) TriggerStream(stream v1.FaasService_TriggerStreamServer) error

TriggerStream - Starts a new FaaS server stream

The deployment server collects information from stream InitRequests, then immediately terminates the stream This behavior captures enough information to identify function handlers, without executing the handler code during the build process.

type SpecResult added in v1.16.0

type SpecResult struct {
	Apis                []*openapi3.T
	Schedules           []*TopicResult
	BucketNotifications []*BucketNotification
}

type TopicResult added in v1.16.0

type TopicResult struct {
	WorkerKey string `json:"workerKey,omitempty"`
	TopicKey  string `json:"topicKey,omitempty"`
}

Jump to

Keyboard shortcuts

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