module

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSource

type EventSource struct {
	EventSpec struct {
		Gcp google.EventarcTriggerConfig
		Aws any
	}
	TopicSpec struct {
		Gcp google.PubsubTopicConfig
		Aws any
	}
	QueueSpec struct {
		Gcp google.CloudTasksQueueConfig
		Aws any
	}
	ScheduleSpec struct {
		Gcp google.CloudSchedulerJobConfig
		Aws any
	}
}

func (*EventSource) UnmarshalJSON

func (c *EventSource) UnmarshalJSON(b []byte) error

type Manifest

type Manifest struct {
	Path    string
	Modules []Module
}

func DetectManifests

func DetectManifests(config *project.Config) ([]Manifest, error)

func (*Manifest) FilterModules

func (m *Manifest) FilterModules(predicates []func(*Module) bool) [][]*Module

func (*Manifest) UnmarshalJSON

func (m *Manifest) UnmarshalJSON(b []byte) error

type Metadata

type Metadata struct {
	Metadata map[string]string `json:"metadata"`
}

type Module

type Module struct {
	Name          string        `json:"name"`
	EventSource   EventSource   `json:"eventSource"`
	Service       Service       `json:"service"`
	Networking    Networking    `json:"networking"`
	Security      Security      `json:"security"`
	Orchestration Orchestration `json:"orchestration"`
	Metadata      Metadata      `json:"metadata"`
}

type Networking

type Networking struct {
	Internal bool `json:"internal"`
	Ingress  struct {
		Gateway struct {
			Paths map[string]map[string]struct {
				Parameters []struct {
					Name     string `json:"name"`
					In       string `json:"in"`
					Required bool   `json:"required"`
					// contains filtered or unexported fields
				} `json:"parameters"`
				RequestBody struct {
					// contains filtered or unexported fields
				} `json:"requestBody"`
				Responses map[string]struct {
					Description string `json:"description"`
					Headers     map[string]struct {
						// contains filtered or unexported fields
					} `json:"headers"`
					// contains filtered or unexported fields
				} `json:"responses"`
				Security []map[string][]string `json:"security"`
			} `json:"paths"`
			Components struct {
				SecuritySchemes map[string]struct {
					Type string `json:"type"`
					Name string `json:"name"`
					In   string `json:"in"`
				} `json:"securitySchemes"`
			} `json:"components"`
		} `json:"gateway"`
	} `json:"ingress"`
	Egress struct {
		StaticIp bool `json:"staticIp"`
	} `json:"egress"`
}

type Orchestration

type Orchestration struct {
	Workflow struct {
		Start bool `json:"start"`
		End   bool `json:"end"`
		Input struct {
			Expression struct {
				Gcp string `json:"gcp"`
				Aws string `json:"aws"`
			} `json:"expression"`
		} `json:"input"`
		Output struct {
			Expression struct {
				Gcp string `json:"gcp"`
				Aws string `json:"aws"`
			} `json:"expression"`
		} `json:"output"`
		Next struct {
			Jump struct {
				ServiceName string `json:"serviceName"`
			} `json:"jump"`
			Condition []struct {
				Expression struct {
					Gcp string `json:"gcp"`
					Aws string `json:"aws"`
				} `json:"expression"`
				ServiceName string `json:"serviceName"`
			} `json:"condition"`
		} `json:"next"`
	} `json:"workflow"`
}

type Security

type Security struct {
	NoAuthentication bool `json:"noAuthentication"`
}

type Service

type Service struct {
	Function struct {
		Gcp google.Cloudfunctions2FunctionConfig `json:"gcp"`
		Aws any                                  `json:"aws"`
	} `json:"function"`
	Container struct {
		Gcp google.CloudRunServiceConfig `json:"gcp"`
		Aws any                          `json:"aws"`
	} `json:"container"`
}

func (*Service) UnmarshalJSON

func (c *Service) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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