policy

package
v0.0.0-...-a79a6e6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_policy_proto protoreflect.FileDescriptor
View Source
var Policy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "policy.Policy",
	HandlerType: (*PolicyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReadPolicy",
			Handler:    _Policy_ReadPolicy_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "policy.proto",
}

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

Functions

func RegisterPolicyServer

func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer)

Types

type PolicyClient

type PolicyClient interface {
	ReadPolicy(ctx context.Context, in *ReadPolicyYAMLFile, opts ...grpc.CallOption) (*PolicyResponse, error)
}

PolicyClient is the client API for Policy 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 NewPolicyClient

func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient

type PolicyResponse

type PolicyResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Response For Policy

func (*PolicyResponse) Descriptor deprecated

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

Deprecated: Use PolicyResponse.ProtoReflect.Descriptor instead.

func (*PolicyResponse) GetMessage

func (x *PolicyResponse) GetMessage() string

func (*PolicyResponse) ProtoMessage

func (*PolicyResponse) ProtoMessage()

func (*PolicyResponse) ProtoReflect

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

func (*PolicyResponse) Reset

func (x *PolicyResponse) Reset()

func (*PolicyResponse) String

func (x *PolicyResponse) String() string

type PolicyServer

type PolicyServer interface {
	ReadPolicy(context.Context, *ReadPolicyYAMLFile) (*PolicyResponse, error)
	// contains filtered or unexported methods
}

PolicyServer is the server API for Policy service. All implementations must embed UnimplementedPolicyServer for forward compatibility

type ReadPolicyYAMLFile

type ReadPolicyYAMLFile struct {
	Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
	// contains filtered or unexported fields
}

Read a Policy YAML

func (*ReadPolicyYAMLFile) Descriptor deprecated

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

Deprecated: Use ReadPolicyYAMLFile.ProtoReflect.Descriptor instead.

func (*ReadPolicyYAMLFile) GetPolicy

func (x *ReadPolicyYAMLFile) GetPolicy() string

func (*ReadPolicyYAMLFile) ProtoMessage

func (*ReadPolicyYAMLFile) ProtoMessage()

func (*ReadPolicyYAMLFile) ProtoReflect

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

func (*ReadPolicyYAMLFile) Reset

func (x *ReadPolicyYAMLFile) Reset()

func (*ReadPolicyYAMLFile) String

func (x *ReadPolicyYAMLFile) String() string

type UnimplementedPolicyServer

type UnimplementedPolicyServer struct {
}

UnimplementedPolicyServer must be embedded to have forward compatible implementations.

func (UnimplementedPolicyServer) ReadPolicy

type UnsafePolicyServer

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

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

Jump to

Keyboard shortcuts

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