configv1

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 76

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spire.service.common.config.v1.Config",
	HandlerType: (*ConfigServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Configure",
			Handler:    _Config_Configure_Handler,
		},
		{
			MethodName: "Validate",
			Handler:    _Config_Validate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spire/service/common/config/v1/config.proto",
}

Config_ServiceDesc is the grpc.ServiceDesc for Config service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_spire_service_common_config_v1_config_proto protoreflect.FileDescriptor

Functions

func ConfigServiceServer

func ConfigServiceServer(server ConfigServer) pluginsdk.ServiceServer

func RegisterConfigServer

func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer)

Types

type ConfigClient

type ConfigClient interface {
	// Configure is called by SPIRE to configure the plugin with the plugin
	// specific configuration data and a set of SPIRE core configuration. It is
	// currently called when the plugin is first loaded after it has been
	// initialized. At a future point, it may be called to reconfigure the
	// plugin during runtime. Implementations should therefore expect that
	// calls to Configure can happen concurrently with other RPCs against the
	// plugin.
	Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
	// Validate is called by SPIRE with a potential specific configuration for
	// the plugin to determine if it is usable.
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}

ConfigClient is the client API for Config service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewConfigClient

func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient

type ConfigServer

type ConfigServer interface {
	// Configure is called by SPIRE to configure the plugin with the plugin
	// specific configuration data and a set of SPIRE core configuration. It is
	// currently called when the plugin is first loaded after it has been
	// initialized. At a future point, it may be called to reconfigure the
	// plugin during runtime. Implementations should therefore expect that
	// calls to Configure can happen concurrently with other RPCs against the
	// plugin.
	Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error)
	// Validate is called by SPIRE with a potential specific configuration for
	// the plugin to determine if it is usable.
	Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
	// contains filtered or unexported methods
}

ConfigServer is the server API for Config service. All implementations must embed UnimplementedConfigServer for forward compatibility

type ConfigServiceClient

type ConfigServiceClient struct {
	ConfigClient
}

func (*ConfigServiceClient) GRPCServiceName

func (c *ConfigServiceClient) GRPCServiceName() string

func (*ConfigServiceClient) InitClient

func (c *ConfigServiceClient) InitClient(conn grpc.ClientConnInterface) interface{}

func (*ConfigServiceClient) IsInitialized

func (c *ConfigServiceClient) IsInitialized() bool

type ConfigureRequest

type ConfigureRequest struct {

	// Required. Core SPIRE configuration.
	CoreConfiguration *CoreConfiguration `protobuf:"bytes,1,opt,name=core_configuration,json=coreConfiguration,proto3" json:"core_configuration,omitempty"`
	// Required. HCL encoded plugin configuration.
	HclConfiguration string `protobuf:"bytes,2,opt,name=hcl_configuration,json=hclConfiguration,proto3" json:"hcl_configuration,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureRequest) Descriptor deprecated

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

Deprecated: Use ConfigureRequest.ProtoReflect.Descriptor instead.

func (*ConfigureRequest) GetCoreConfiguration

func (x *ConfigureRequest) GetCoreConfiguration() *CoreConfiguration

func (*ConfigureRequest) GetHclConfiguration

func (x *ConfigureRequest) GetHclConfiguration() string

func (*ConfigureRequest) ProtoMessage

func (*ConfigureRequest) ProtoMessage()

func (*ConfigureRequest) ProtoReflect

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

func (*ConfigureRequest) Reset

func (x *ConfigureRequest) Reset()

func (*ConfigureRequest) String

func (x *ConfigureRequest) String() string

type ConfigureResponse

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

func (*ConfigureResponse) Descriptor deprecated

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

Deprecated: Use ConfigureResponse.ProtoReflect.Descriptor instead.

func (*ConfigureResponse) ProtoMessage

func (*ConfigureResponse) ProtoMessage()

func (*ConfigureResponse) ProtoReflect

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

func (*ConfigureResponse) Reset

func (x *ConfigureResponse) Reset()

func (*ConfigureResponse) String

func (x *ConfigureResponse) String() string

type CoreConfiguration

type CoreConfiguration struct {

	// Required. The trust domain name SPIRE is configured with (e.g.
	// "example.org").
	TrustDomain string `protobuf:"bytes,1,opt,name=trust_domain,json=trustDomain,proto3" json:"trust_domain,omitempty"`
	// contains filtered or unexported fields
}

func (*CoreConfiguration) Descriptor deprecated

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

Deprecated: Use CoreConfiguration.ProtoReflect.Descriptor instead.

func (*CoreConfiguration) GetTrustDomain

func (x *CoreConfiguration) GetTrustDomain() string

func (*CoreConfiguration) ProtoMessage

func (*CoreConfiguration) ProtoMessage()

func (*CoreConfiguration) ProtoReflect

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

func (*CoreConfiguration) Reset

func (x *CoreConfiguration) Reset()

func (*CoreConfiguration) String

func (x *CoreConfiguration) String() string

type UnimplementedConfigServer

type UnimplementedConfigServer struct {
}

UnimplementedConfigServer must be embedded to have forward compatible implementations.

func (UnimplementedConfigServer) Configure

func (UnimplementedConfigServer) Validate added in v1.11.0

type UnsafeConfigServer

type UnsafeConfigServer interface {
	// contains filtered or unexported methods
}

UnsafeConfigServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigServer will result in compilation errors.

type ValidateRequest added in v1.11.0

type ValidateRequest struct {

	// Required. Core SPIRE configuration.
	CoreConfiguration *CoreConfiguration `protobuf:"bytes,1,opt,name=core_configuration,json=coreConfiguration,proto3" json:"core_configuration,omitempty"`
	// Required. HCL encoded plugin configuration.
	HclConfiguration string `protobuf:"bytes,2,opt,name=hcl_configuration,json=hclConfiguration,proto3" json:"hcl_configuration,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateRequest) Descriptor deprecated added in v1.11.0

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

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetCoreConfiguration added in v1.11.0

func (x *ValidateRequest) GetCoreConfiguration() *CoreConfiguration

func (*ValidateRequest) GetHclConfiguration added in v1.11.0

func (x *ValidateRequest) GetHclConfiguration() string

func (*ValidateRequest) ProtoMessage added in v1.11.0

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect added in v1.11.0

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

func (*ValidateRequest) Reset added in v1.11.0

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String added in v1.11.0

func (x *ValidateRequest) String() string

type ValidateResponse added in v1.11.0

type ValidateResponse struct {

	// Required. True when the plugin deems the configuration usable.
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// Examples of invalid configuration notes include:
	// - value for "plugin.port" is not a number.
	// - missing field "plugin.user"
	// - specified SPIFFE ID in "plugin.spiffe_id" is not within system trust domain.
	// - etc.
	Notes []string `protobuf:"bytes,2,rep,name=notes,proto3" json:"notes,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateResponse) Descriptor deprecated added in v1.11.0

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

Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.

func (*ValidateResponse) GetNotes added in v1.11.0

func (x *ValidateResponse) GetNotes() []string

func (*ValidateResponse) GetValid added in v1.11.0

func (x *ValidateResponse) GetValid() bool

func (*ValidateResponse) ProtoMessage added in v1.11.0

func (*ValidateResponse) ProtoMessage()

func (*ValidateResponse) ProtoReflect added in v1.11.0

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

func (*ValidateResponse) Reset added in v1.11.0

func (x *ValidateResponse) Reset()

func (*ValidateResponse) String added in v1.11.0

func (x *ValidateResponse) String() string

Jump to

Keyboard shortcuts

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