cs_nginx

package
v0.0.0-...-f54f16c Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_cs_nginx_config_request_proto protoreflect.FileDescriptor

Functions

func CalculateContentMD5

func CalculateContentMD5(data []byte) string

CalculateContentMD5 returns a base-64 encoded MD5 sum of the given bytes.

To ensure compatibility with the upstream chef-server this should be the same as the value returned by Ruby's

Digest::MD5.base64digest

Types

type ConfigRequest

type ConfigRequest struct {
	V1 *ConfigRequest_V1 `protobuf:"bytes,1,opt,name=v1,proto3" json:"v1,omitempty" toml:"v1,omitempty" mapstructure:"v1,omitempty"`
	// contains filtered or unexported fields
}

func DefaultConfigRequest

func DefaultConfigRequest() *ConfigRequest

DefaultConfigRequest returns a new instance of ConfigRequest with default values.

func NewConfigRequest

func NewConfigRequest() *ConfigRequest

NewConfigRequest returns a new instance of ConfigRequest with zero values.

func (*ConfigRequest) BindPort

func (m *ConfigRequest) BindPort(name string, value uint16) error

BindPort sets the port tagged with the given name

func (*ConfigRequest) Descriptor deprecated

func (*ConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead.

func (*ConfigRequest) GetPort

func (m *ConfigRequest) GetPort(name string) (uint16, error)

GetPort gets the port tagged with the given name. If the value is not set, it returns 0.

func (*ConfigRequest) GetSecret

func (m *ConfigRequest) GetSecret(name string) *wrappers.StringValue

GetSecret gets a secret by name. Returns nil if it is not set

func (*ConfigRequest) GetV1

func (x *ConfigRequest) GetV1() *ConfigRequest_V1

func (*ConfigRequest) ListPorts

func (m *ConfigRequest) ListPorts() []a2conf.PortInfo

ListPorts lists all the ports exposed by the config

func (*ConfigRequest) ListSecrets

func (m *ConfigRequest) ListSecrets() []a2conf.SecretInfo

ListSecrets lists all the secrets exposed by the config

func (*ConfigRequest) PrepareSystemConfig

func (c *ConfigRequest) PrepareSystemConfig(creds *ac.TLSCredentials) (ac.PreparedSystemConfig, error)

PrepareSystemConfig returns a system configuration that can be used to start the service.

func (*ConfigRequest) ProtoMessage

func (*ConfigRequest) ProtoMessage()

func (*ConfigRequest) ProtoReflect

func (x *ConfigRequest) ProtoReflect() protoreflect.Message

func (*ConfigRequest) Reset

func (x *ConfigRequest) Reset()

func (*ConfigRequest) ServiceName

func (m *ConfigRequest) ServiceName() string

ServiceName returns the name of the service this config belongs to

func (*ConfigRequest) SetGlobalConfig

func (c *ConfigRequest) SetGlobalConfig(g *ac.GlobalConfig)

SetGlobalConfig is a callback that allows us to populate the configuration of an individual service with global automate config.

func (*ConfigRequest) SetSecret

func (m *ConfigRequest) SetSecret(name string, value *wrappers.StringValue) error

SetSecret sets a secret by name. Returns ErrSecretNotFound if the secret does not exist

func (*ConfigRequest) String

func (x *ConfigRequest) String() string

func (*ConfigRequest) Validate

func (c *ConfigRequest) Validate() error

Validate validates that the config is sufficient to start the Service. If validation succeeds it will return nil, if it fails it will return a new instance of config.InvalidConfigError that has the missing keys and invalid fields populated.

type ConfigRequest_V1

type ConfigRequest_V1 struct {
	Sys *ConfigRequest_V1_System  `protobuf:"bytes,1,opt,name=sys,proto3" json:"sys,omitempty" toml:"sys,omitempty" mapstructure:"sys,omitempty"`
	Svc *ConfigRequest_V1_Service `protobuf:"bytes,2,opt,name=svc,proto3" json:"svc,omitempty" toml:"svc,omitempty" mapstructure:"svc,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1) Descriptor deprecated

func (*ConfigRequest_V1) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1) GetSvc

func (*ConfigRequest_V1) GetSys

func (*ConfigRequest_V1) ProtoMessage

func (*ConfigRequest_V1) ProtoMessage()

func (*ConfigRequest_V1) ProtoReflect

func (x *ConfigRequest_V1) ProtoReflect() protoreflect.Message

func (*ConfigRequest_V1) Reset

func (x *ConfigRequest_V1) Reset()

func (*ConfigRequest_V1) String

func (x *ConfigRequest_V1) String() string

type ConfigRequest_V1_Service

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

func (*ConfigRequest_V1_Service) Descriptor deprecated

func (*ConfigRequest_V1_Service) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_Service.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_Service) ProtoMessage

func (*ConfigRequest_V1_Service) ProtoMessage()

func (*ConfigRequest_V1_Service) ProtoReflect

func (x *ConfigRequest_V1_Service) ProtoReflect() protoreflect.Message

func (*ConfigRequest_V1_Service) Reset

func (x *ConfigRequest_V1_Service) Reset()

func (*ConfigRequest_V1_Service) String

func (x *ConfigRequest_V1_Service) String() string

type ConfigRequest_V1_System

type ConfigRequest_V1_System struct {
	Mlsa             *shared.Mlsa                              `protobuf:"bytes,1,opt,name=mlsa,proto3" json:"mlsa,omitempty" toml:"mlsa,omitempty" mapstructure:"mlsa,omitempty"`
	Log              *ConfigRequest_V1_System_Log              `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty" toml:"log,omitempty" mapstructure:"log,omitempty"`
	Service          *ConfigRequest_V1_System_Service          `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty" toml:"service,omitempty" mapstructure:"service,omitempty"`
	Ngx              *ConfigRequest_V1_System_Nginx            `protobuf:"bytes,4,opt,name=ngx,proto3" json:"ngx,omitempty" toml:"ngx,omitempty" mapstructure:"ngx,omitempty"`
	Tls              *shared.TLSCredentials                    `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty" toml:"tls,omitempty" mapstructure:"tls,omitempty"`
	RequiredRecipe   *ConfigRequest_V1_System_RequiredRecipe   `` /* 177-byte string literal not displayed */
	ExternalAutomate *ConfigRequest_V1_System_ExternalAutomate `` /* 187-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System) Descriptor deprecated

func (*ConfigRequest_V1_System) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System) GetExternalAutomate

func (*ConfigRequest_V1_System) GetLog

func (*ConfigRequest_V1_System) GetMlsa

func (x *ConfigRequest_V1_System) GetMlsa() *shared.Mlsa

func (*ConfigRequest_V1_System) GetNgx

func (*ConfigRequest_V1_System) GetRequiredRecipe

func (*ConfigRequest_V1_System) GetService

func (*ConfigRequest_V1_System) GetTls

func (*ConfigRequest_V1_System) ProtoMessage

func (*ConfigRequest_V1_System) ProtoMessage()

func (*ConfigRequest_V1_System) ProtoReflect

func (x *ConfigRequest_V1_System) ProtoReflect() protoreflect.Message

func (*ConfigRequest_V1_System) Reset

func (x *ConfigRequest_V1_System) Reset()

func (*ConfigRequest_V1_System) String

func (x *ConfigRequest_V1_System) String() string

type ConfigRequest_V1_System_ExternalAutomate

type ConfigRequest_V1_System_ExternalAutomate struct {
	Enable      *wrapperspb.BoolValue   `protobuf:"bytes,1,opt,name=enable,proto3" json:"enable,omitempty" toml:"enable,omitempty" mapstructure:"enable,omitempty"`
	SslUpstream *wrapperspb.BoolValue   `` /* 162-byte string literal not displayed */
	Endpoint    *wrapperspb.StringValue `` /* 129-byte string literal not displayed */
	Token       *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty" toml:"token,omitempty" mapstructure:"token,omitempty"`
	RootCert    *wrapperspb.StringValue `` /* 147-byte string literal not displayed */
	ServerName  *wrapperspb.StringValue `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_ExternalAutomate) Descriptor deprecated

func (*ConfigRequest_V1_System_ExternalAutomate) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_ExternalAutomate.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_ExternalAutomate) GetEnable

func (*ConfigRequest_V1_System_ExternalAutomate) GetEndpoint

func (*ConfigRequest_V1_System_ExternalAutomate) GetRootCert

func (*ConfigRequest_V1_System_ExternalAutomate) GetServerName

func (*ConfigRequest_V1_System_ExternalAutomate) GetSslUpstream

func (*ConfigRequest_V1_System_ExternalAutomate) GetToken

func (*ConfigRequest_V1_System_ExternalAutomate) ProtoMessage

func (*ConfigRequest_V1_System_ExternalAutomate) ProtoReflect

func (*ConfigRequest_V1_System_ExternalAutomate) Reset

func (*ConfigRequest_V1_System_ExternalAutomate) String

type ConfigRequest_V1_System_Log

type ConfigRequest_V1_System_Log struct {
	Level *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty" toml:"level,omitempty" mapstructure:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Log) Descriptor deprecated

func (*ConfigRequest_V1_System_Log) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Log.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Log) GetLevel

func (*ConfigRequest_V1_System_Log) ProtoMessage

func (*ConfigRequest_V1_System_Log) ProtoMessage()

func (*ConfigRequest_V1_System_Log) ProtoReflect

func (*ConfigRequest_V1_System_Log) Reset

func (x *ConfigRequest_V1_System_Log) Reset()

func (*ConfigRequest_V1_System_Log) String

func (x *ConfigRequest_V1_System_Log) String() string

type ConfigRequest_V1_System_Nginx

type ConfigRequest_V1_System_Nginx struct {
	Main   *ConfigRequest_V1_System_Nginx_Main   `protobuf:"bytes,1,opt,name=main,proto3" json:"main,omitempty" toml:"main,omitempty" mapstructure:"main,omitempty"`
	Events *ConfigRequest_V1_System_Nginx_Events `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty" toml:"events,omitempty" mapstructure:"events,omitempty"`
	Http   *ConfigRequest_V1_System_Nginx_Http   `protobuf:"bytes,3,opt,name=http,proto3" json:"http,omitempty" toml:"http,omitempty" mapstructure:"http,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Nginx) Descriptor deprecated

func (*ConfigRequest_V1_System_Nginx) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Nginx.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Nginx) GetEvents

func (*ConfigRequest_V1_System_Nginx) GetHttp

func (*ConfigRequest_V1_System_Nginx) GetMain

func (*ConfigRequest_V1_System_Nginx) ProtoMessage

func (*ConfigRequest_V1_System_Nginx) ProtoMessage()

func (*ConfigRequest_V1_System_Nginx) ProtoReflect

func (*ConfigRequest_V1_System_Nginx) Reset

func (x *ConfigRequest_V1_System_Nginx) Reset()

func (*ConfigRequest_V1_System_Nginx) String

type ConfigRequest_V1_System_Nginx_Events

type ConfigRequest_V1_System_Nginx_Events struct {
	WorkerConnections *wrapperspb.Int32Value `` /* 192-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Nginx_Events) Descriptor deprecated

func (*ConfigRequest_V1_System_Nginx_Events) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Nginx_Events.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Nginx_Events) GetWorkerConnections

func (x *ConfigRequest_V1_System_Nginx_Events) GetWorkerConnections() *wrapperspb.Int32Value

func (*ConfigRequest_V1_System_Nginx_Events) ProtoMessage

func (*ConfigRequest_V1_System_Nginx_Events) ProtoMessage()

func (*ConfigRequest_V1_System_Nginx_Events) ProtoReflect

func (*ConfigRequest_V1_System_Nginx_Events) Reset

func (*ConfigRequest_V1_System_Nginx_Events) String

type ConfigRequest_V1_System_Nginx_Http

type ConfigRequest_V1_System_Nginx_Http struct {
	ClientMaxBodySize   *wrapperspb.StringValue `` /* 200-byte string literal not displayed */
	ProxyConnectTimeout *wrapperspb.Int32Value  `` /* 206-byte string literal not displayed */
	KeepaliveTimeout    *wrapperspb.Int32Value  `` /* 187-byte string literal not displayed */
	Gzip                *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=gzip,proto3" json:"gzip,omitempty" toml:"gzip,omitempty" mapstructure:"gzip,omitempty"`
	GzipHttpVersion     *wrapperspb.StringValue `` /* 186-byte string literal not displayed */
	// StringValue for consitency with other nginx configs
	GzipCompLevel             *wrapperspb.StringValue `` /* 176-byte string literal not displayed */
	GzipProxied               *wrapperspb.StringValue `` /* 162-byte string literal not displayed */
	GzipTypes                 *wrapperspb.StringValue `` /* 152-byte string literal not displayed */
	Sendfile                  *wrapperspb.StringValue `` /* 129-byte string literal not displayed */
	TcpNodelay                *wrapperspb.StringValue `` /* 158-byte string literal not displayed */
	TcpNopush                 *wrapperspb.StringValue `` /* 153-byte string literal not displayed */
	SslCiphers                *wrapperspb.StringValue `` /* 158-byte string literal not displayed */
	SslProtocols              *wrapperspb.StringValue `` /* 168-byte string literal not displayed */
	SslVerifyDepth            *wrapperspb.Int32Value  `` /* 182-byte string literal not displayed */
	ServerNamesHashBucketSize *wrapperspb.Int32Value  `` /* 245-byte string literal not displayed */
	ClientBodyBufferSize      *wrapperspb.StringValue `` /* 216-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Nginx_Http) Descriptor deprecated

func (*ConfigRequest_V1_System_Nginx_Http) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Nginx_Http.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Nginx_Http) GetClientBodyBufferSize

func (x *ConfigRequest_V1_System_Nginx_Http) GetClientBodyBufferSize() *wrapperspb.StringValue

func (*ConfigRequest_V1_System_Nginx_Http) GetClientMaxBodySize

func (x *ConfigRequest_V1_System_Nginx_Http) GetClientMaxBodySize() *wrapperspb.StringValue

func (*ConfigRequest_V1_System_Nginx_Http) GetGzip

func (*ConfigRequest_V1_System_Nginx_Http) GetGzipCompLevel

func (*ConfigRequest_V1_System_Nginx_Http) GetGzipHttpVersion

func (*ConfigRequest_V1_System_Nginx_Http) GetGzipProxied

func (*ConfigRequest_V1_System_Nginx_Http) GetGzipTypes

func (*ConfigRequest_V1_System_Nginx_Http) GetKeepaliveTimeout

func (x *ConfigRequest_V1_System_Nginx_Http) GetKeepaliveTimeout() *wrapperspb.Int32Value

func (*ConfigRequest_V1_System_Nginx_Http) GetProxyConnectTimeout

func (x *ConfigRequest_V1_System_Nginx_Http) GetProxyConnectTimeout() *wrapperspb.Int32Value

func (*ConfigRequest_V1_System_Nginx_Http) GetSendfile

func (*ConfigRequest_V1_System_Nginx_Http) GetServerNamesHashBucketSize

func (x *ConfigRequest_V1_System_Nginx_Http) GetServerNamesHashBucketSize() *wrapperspb.Int32Value

func (*ConfigRequest_V1_System_Nginx_Http) GetSslCiphers

func (*ConfigRequest_V1_System_Nginx_Http) GetSslProtocols

func (*ConfigRequest_V1_System_Nginx_Http) GetSslVerifyDepth

func (*ConfigRequest_V1_System_Nginx_Http) GetTcpNodelay

func (*ConfigRequest_V1_System_Nginx_Http) GetTcpNopush

func (*ConfigRequest_V1_System_Nginx_Http) ProtoMessage

func (*ConfigRequest_V1_System_Nginx_Http) ProtoMessage()

func (*ConfigRequest_V1_System_Nginx_Http) ProtoReflect

func (*ConfigRequest_V1_System_Nginx_Http) Reset

func (*ConfigRequest_V1_System_Nginx_Http) String

type ConfigRequest_V1_System_Nginx_Main

type ConfigRequest_V1_System_Nginx_Main struct {
	WorkerProcesses *wrapperspb.Int32Value `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Nginx_Main) Descriptor deprecated

func (*ConfigRequest_V1_System_Nginx_Main) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Nginx_Main.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Nginx_Main) GetWorkerProcesses

func (x *ConfigRequest_V1_System_Nginx_Main) GetWorkerProcesses() *wrapperspb.Int32Value

func (*ConfigRequest_V1_System_Nginx_Main) ProtoMessage

func (*ConfigRequest_V1_System_Nginx_Main) ProtoMessage()

func (*ConfigRequest_V1_System_Nginx_Main) ProtoReflect

func (*ConfigRequest_V1_System_Nginx_Main) Reset

func (*ConfigRequest_V1_System_Nginx_Main) String

type ConfigRequest_V1_System_RequiredRecipe

type ConfigRequest_V1_System_RequiredRecipe struct {
	Enabled *wrapperspb.BoolValue   `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty" toml:"enabled,omitempty" mapstructure:"enabled,omitempty"`
	Path    *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty" toml:"path,omitempty" mapstructure:"path,omitempty"`
	// Auto-calculated
	ContentMd5 *wrapperspb.StringValue `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_RequiredRecipe) Descriptor deprecated

func (*ConfigRequest_V1_System_RequiredRecipe) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_RequiredRecipe.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_RequiredRecipe) GetContentMd5

func (*ConfigRequest_V1_System_RequiredRecipe) GetEnabled

func (*ConfigRequest_V1_System_RequiredRecipe) GetPath

func (*ConfigRequest_V1_System_RequiredRecipe) ProtoMessage

func (*ConfigRequest_V1_System_RequiredRecipe) ProtoReflect

func (*ConfigRequest_V1_System_RequiredRecipe) Reset

func (*ConfigRequest_V1_System_RequiredRecipe) String

type ConfigRequest_V1_System_Service

type ConfigRequest_V1_System_Service struct {

	// Deprecated: Do not use.
	Host       *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty" toml:"host,omitempty" mapstructure:"host,omitempty"` // The listen host is no longer setable(localhost only)
	Port       *wrapperspb.Int32Value  `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty" toml:"port,omitempty" mapstructure:"port,omitempty"`
	StatusPort *wrapperspb.Int32Value  `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Service) Descriptor deprecated

func (*ConfigRequest_V1_System_Service) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest_V1_System_Service.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Service) GetHost deprecated

Deprecated: Do not use.

func (*ConfigRequest_V1_System_Service) GetPort

func (*ConfigRequest_V1_System_Service) GetStatusPort

func (*ConfigRequest_V1_System_Service) ProtoMessage

func (*ConfigRequest_V1_System_Service) ProtoMessage()

func (*ConfigRequest_V1_System_Service) ProtoReflect

func (*ConfigRequest_V1_System_Service) Reset

func (*ConfigRequest_V1_System_Service) String

Jump to

Keyboard shortcuts

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