settingsv1

package
v0.0.0-...-3e9429a Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package settingsv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SettingsAPI_Settings_FullMethodName = "/admiral.settings.v1.SettingsAPI/Settings"
)

Variables

View Source
var File_settings_v1_settings_proto protoreflect.FileDescriptor
View Source
var SettingsAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admiral.settings.v1.SettingsAPI",
	HandlerType: (*SettingsAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Settings",
			Handler:    _SettingsAPI_Settings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "settings/v1/settings.proto",
}

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

Functions

func RegisterSettingsAPIHandler

func RegisterSettingsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSettingsAPIHandler registers the http handlers for service SettingsAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSettingsAPIHandlerClient

func RegisterSettingsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingsAPIClient) error

RegisterSettingsAPIHandlerClient registers the http handlers for service SettingsAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SettingsAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SettingsAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SettingsAPIClient" to call the correct interceptors.

func RegisterSettingsAPIHandlerFromEndpoint

func RegisterSettingsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSettingsAPIHandlerFromEndpoint is same as RegisterSettingsAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSettingsAPIHandlerServer

func RegisterSettingsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingsAPIServer) error

RegisterSettingsAPIHandlerServer registers the http handlers for service SettingsAPI to "mux". UnaryRPC :call SettingsAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSettingsAPIHandlerFromEndpoint instead.

func RegisterSettingsAPIServer

func RegisterSettingsAPIServer(s grpc.ServiceRegistrar, srv SettingsAPIServer)

Types

type OIDCConfig

type OIDCConfig struct {
	Name        string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Issuer      string   `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
	ClientId    string   `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	CliClientId string   `protobuf:"bytes,4,opt,name=cli_client_id,json=cliClientId,proto3" json:"cli_client_id,omitempty"`
	Scopes      []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*OIDCConfig) Descriptor deprecated

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

Deprecated: Use OIDCConfig.ProtoReflect.Descriptor instead.

func (*OIDCConfig) GetCliClientId

func (x *OIDCConfig) GetCliClientId() string

func (*OIDCConfig) GetClientId

func (x *OIDCConfig) GetClientId() string

func (*OIDCConfig) GetIssuer

func (x *OIDCConfig) GetIssuer() string

func (*OIDCConfig) GetName

func (x *OIDCConfig) GetName() string

func (*OIDCConfig) GetScopes

func (x *OIDCConfig) GetScopes() []string

func (*OIDCConfig) ProtoMessage

func (*OIDCConfig) ProtoMessage()

func (*OIDCConfig) ProtoReflect

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

func (*OIDCConfig) Reset

func (x *OIDCConfig) Reset()

func (*OIDCConfig) String

func (x *OIDCConfig) String() string

func (*OIDCConfig) Validate

func (m *OIDCConfig) Validate() error

Validate checks the field values on OIDCConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*OIDCConfig) ValidateAll

func (m *OIDCConfig) ValidateAll() error

ValidateAll checks the field values on OIDCConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OIDCConfigMultiError, or nil if none found.

type OIDCConfigMultiError

type OIDCConfigMultiError []error

OIDCConfigMultiError is an error wrapping multiple validation errors returned by OIDCConfig.ValidateAll() if the designated constraints aren't met.

func (OIDCConfigMultiError) AllErrors

func (m OIDCConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (OIDCConfigMultiError) Error

func (m OIDCConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type OIDCConfigValidationError

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

OIDCConfigValidationError is the validation error returned by OIDCConfig.Validate if the designated constraints aren't met.

func (OIDCConfigValidationError) Cause

func (e OIDCConfigValidationError) Cause() error

Cause function returns cause value.

func (OIDCConfigValidationError) Error

Error satisfies the builtin error interface

func (OIDCConfigValidationError) ErrorName

func (e OIDCConfigValidationError) ErrorName() string

ErrorName returns error name.

func (OIDCConfigValidationError) Field

Field function returns field value.

func (OIDCConfigValidationError) Key

Key function returns key value.

func (OIDCConfigValidationError) Reason

func (e OIDCConfigValidationError) Reason() string

Reason function returns reason value.

type SettingsAPIClient

type SettingsAPIClient interface {
	Settings(ctx context.Context, in *SettingsRequest, opts ...grpc.CallOption) (*SettingsResponse, error)
}

SettingsAPIClient is the client API for SettingsAPI 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.

type SettingsAPIServer

type SettingsAPIServer interface {
	Settings(context.Context, *SettingsRequest) (*SettingsResponse, error)
}

SettingsAPIServer is the server API for SettingsAPI service. All implementations should embed UnimplementedSettingsAPIServer for forward compatibility

type SettingsRequest

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

func (*SettingsRequest) Descriptor deprecated

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

Deprecated: Use SettingsRequest.ProtoReflect.Descriptor instead.

func (*SettingsRequest) ProtoMessage

func (*SettingsRequest) ProtoMessage()

func (*SettingsRequest) ProtoReflect

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

func (*SettingsRequest) Reset

func (x *SettingsRequest) Reset()

func (*SettingsRequest) String

func (x *SettingsRequest) String() string

func (*SettingsRequest) Validate

func (m *SettingsRequest) Validate() error

Validate checks the field values on SettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SettingsRequest) ValidateAll

func (m *SettingsRequest) ValidateAll() error

ValidateAll checks the field values on SettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SettingsRequestMultiError, or nil if none found.

type SettingsRequestMultiError

type SettingsRequestMultiError []error

SettingsRequestMultiError is an error wrapping multiple validation errors returned by SettingsRequest.ValidateAll() if the designated constraints aren't met.

func (SettingsRequestMultiError) AllErrors

func (m SettingsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SettingsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SettingsRequestValidationError

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

SettingsRequestValidationError is the validation error returned by SettingsRequest.Validate if the designated constraints aren't met.

func (SettingsRequestValidationError) Cause

Cause function returns cause value.

func (SettingsRequestValidationError) Error

Error satisfies the builtin error interface

func (SettingsRequestValidationError) ErrorName

func (e SettingsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SettingsRequestValidationError) Field

Field function returns field value.

func (SettingsRequestValidationError) Key

Key function returns key value.

func (SettingsRequestValidationError) Reason

Reason function returns reason value.

type SettingsResponse

type SettingsResponse struct {
	Url        string      `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	OidcConfig *OIDCConfig `protobuf:"bytes,2,opt,name=oidc_config,json=oidcConfig,proto3" json:"oidc_config,omitempty"`
	// contains filtered or unexported fields
}

func (*SettingsResponse) Descriptor deprecated

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

Deprecated: Use SettingsResponse.ProtoReflect.Descriptor instead.

func (*SettingsResponse) GetOidcConfig

func (x *SettingsResponse) GetOidcConfig() *OIDCConfig

func (*SettingsResponse) GetUrl

func (x *SettingsResponse) GetUrl() string

func (*SettingsResponse) ProtoMessage

func (*SettingsResponse) ProtoMessage()

func (*SettingsResponse) ProtoReflect

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

func (*SettingsResponse) Reset

func (x *SettingsResponse) Reset()

func (*SettingsResponse) String

func (x *SettingsResponse) String() string

func (*SettingsResponse) Validate

func (m *SettingsResponse) Validate() error

Validate checks the field values on SettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SettingsResponse) ValidateAll

func (m *SettingsResponse) ValidateAll() error

ValidateAll checks the field values on SettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SettingsResponseMultiError, or nil if none found.

type SettingsResponseMultiError

type SettingsResponseMultiError []error

SettingsResponseMultiError is an error wrapping multiple validation errors returned by SettingsResponse.ValidateAll() if the designated constraints aren't met.

func (SettingsResponseMultiError) AllErrors

func (m SettingsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SettingsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SettingsResponseValidationError

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

SettingsResponseValidationError is the validation error returned by SettingsResponse.Validate if the designated constraints aren't met.

func (SettingsResponseValidationError) Cause

Cause function returns cause value.

func (SettingsResponseValidationError) Error

Error satisfies the builtin error interface

func (SettingsResponseValidationError) ErrorName

ErrorName returns error name.

func (SettingsResponseValidationError) Field

Field function returns field value.

func (SettingsResponseValidationError) Key

Key function returns key value.

func (SettingsResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedSettingsAPIServer

type UnimplementedSettingsAPIServer struct {
}

UnimplementedSettingsAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedSettingsAPIServer) Settings

type UnsafeSettingsAPIServer

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

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

Jump to

Keyboard shortcuts

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