codeconfig

package
v1.33.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 40 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)

func ValidateUpRequest added in v1.25.0

func ValidateUpRequest(request *deploy.DeployUpRequest) 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)

func (*Api) String

func (a *Api) String() string

func (*Api) WorkerCount added in v1.33.4

func (a *Api) WorkerCount() int

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, projectFunction project.Function) *FunctionDependencies

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

func (*FunctionDependencies) AddApiHandler

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

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)

AddBucketNotificationHandler - registers a handler in the function that is triggered by bucket events

func (*FunctionDependencies) AddCollection

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

AddCollection - adds a document database collection dependency to the function

func (*FunctionDependencies) AddError added in v1.24.0

func (a *FunctionDependencies) AddError(err string)

func (*FunctionDependencies) AddHttpWorker added in v1.24.0

func (a *FunctionDependencies) AddHttpWorker(hw *v1.HttpWorker)

AddHttpWorker - registers a handler in the function that listens on a port

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)

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)

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) AddWebsocketHandler added in v1.25.0

func (a *FunctionDependencies) AddWebsocketHandler(ws *v1.WebsocketWorker)

func (*FunctionDependencies) WorkerCount added in v1.2.0

func (a *FunctionDependencies) WorkerCount() int

type HttpWorker added in v1.24.0

type HttpWorker struct {
	Port int `json:"port,omitempty"`
}

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
	Topics              []*TopicResult
	BucketNotifications []*BucketNotification
	HttpWorkers         []*HttpWorker
	WebSockets          []*WebsocketResult
}

type TopicResult added in v1.16.0

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

type Websocket added in v1.25.0

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

func (*Websocket) AddWorker added in v1.25.0

func (a *Websocket) AddWorker(worker *v1.WebsocketWorker)

func (*Websocket) WorkerCount added in v1.26.0

func (a *Websocket) WorkerCount() int

type WebsocketResult added in v1.27.0

type WebsocketResult struct {
	Name   string   `json:"name,omitempty"`
	Events []string `json:"events,omitempty"`
}

Jump to

Keyboard shortcuts

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