model

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAccessLogs

func ConvertAccessLogs(accessLogs []*AccessLog) (logs []string)

func ConvertErrorLogs

func ConvertErrorLogs(errorLogs []*ErrorLog) (logs []string)

Types

type APIDetails

type APIDetails struct {
	URL      string
	Listen   string
	Location string
	Ca       string
}

type AccessLog

type AccessLog struct {
	Name        string
	Format      string
	Permissions string
	Readable    bool
}

type ConfigApplyMessage

type ConfigApplyMessage struct {
	Error         error
	CorrelationID string
	InstanceID    string
}

type ConfigApplySuccess

type ConfigApplySuccess struct {
	ConfigContext     *NginxConfigContext
	DataPlaneResponse *v1.DataPlaneResponse
}

type ErrorLog

type ErrorLog struct {
	Name        string
	LogLevel    string
	Permissions string
	Readable    bool
}

type FileAction

type FileAction int
const (
	Add FileAction = iota + 1
	Update
	Delete
	Unchanged
)

type FileCache

type FileCache struct {
	File   *mpi.File
	Action FileAction
}

type ManifestFile

type ManifestFile struct {
	ManifestFileMeta *ManifestFileMeta `json:"manifest_file_meta"`
}

type ManifestFileMeta

type ManifestFileMeta struct {
	// The full path of the file
	Name string `json:"name"`
	// The hash of the file contents sha256, hex encoded
	Hash string `json:"hash"`
	// The size of the file in bytes
	Size int64 `json:"size"`
	// File referenced in the NGINX config
	Referenced bool `json:"referenced"`
}

type NginxConfigContext

type NginxConfigContext struct {
	StubStatus       *APIDetails
	PlusAPI          *APIDetails
	InstanceID       string
	Files            []*v1.File
	AccessLogs       []*AccessLog
	ErrorLogs        []*ErrorLog
	NAPSysLogServers []string
	Includes         []string
}

func (*NginxConfigContext) Equal

func (ncc *NginxConfigContext) Equal(otherNginxConfigContext *NginxConfigContext) bool

Complexity is 11, allowed is 10 nolint: revive, cyclop

type ServerType added in v3.2.0

type ServerType int
const (
	Command ServerType = iota
	Auxiliary
)

func (ServerType) String added in v3.2.0

func (s ServerType) String() string

type WriteStatus

type WriteStatus int
const (
	RollbackRequired WriteStatus = iota + 1
	NoChange
	Error
	OK
)

Jump to

Keyboard shortcuts

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