ptypes

package
v0.0.0-...-fce8085 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Changes_Kind_name = map[int32]string{
		0: "CREATE",
		1: "UPDATE",
		2: "DELETE",
	}
	Changes_Kind_value = map[string]int32{
		"CREATE": 0,
		"UPDATE": 1,
		"DELETE": 2,
	}
)

Enum value maps for Changes_Kind.

View Source
var Odin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "odin.Odin",
	HandlerType: (*OdinServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Audit",
			Handler:    _Odin_Audit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "odin.proto",
}

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

Functions

func RegisterOdinServer

func RegisterOdinServer(s grpc.ServiceRegistrar, srv OdinServer)

Types

type AuditRequest

type AuditRequest struct {
	System    string                 `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	User      *User                  `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	Changes   *Changes               `protobuf:"bytes,4,opt,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

func (*AuditRequest) Descriptor deprecated

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

Deprecated: Use AuditRequest.ProtoReflect.Descriptor instead.

func (*AuditRequest) GetChanges

func (x *AuditRequest) GetChanges() *Changes

func (*AuditRequest) GetSystem

func (x *AuditRequest) GetSystem() string

func (*AuditRequest) GetTimestamp

func (x *AuditRequest) GetTimestamp() *timestamppb.Timestamp

func (*AuditRequest) GetUser

func (x *AuditRequest) GetUser() *User

func (*AuditRequest) ProtoMessage

func (*AuditRequest) ProtoMessage()

func (*AuditRequest) ProtoReflect

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

func (*AuditRequest) Reset

func (x *AuditRequest) Reset()

func (*AuditRequest) String

func (x *AuditRequest) String() string

type Changes

type Changes struct {
	Entity      string            `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
	Description string            `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Kind        Changes_Kind      `protobuf:"varint,3,opt,name=kind,proto3,enum=odin.Changes_Kind" json:"kind,omitempty"`
	Values      map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Changes) Descriptor deprecated

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

Deprecated: Use Changes.ProtoReflect.Descriptor instead.

func (*Changes) GetDescription

func (x *Changes) GetDescription() string

func (*Changes) GetEntity

func (x *Changes) GetEntity() string

func (*Changes) GetKind

func (x *Changes) GetKind() Changes_Kind

func (*Changes) GetValues

func (x *Changes) GetValues() map[string]string

func (*Changes) ProtoMessage

func (*Changes) ProtoMessage()

func (*Changes) ProtoReflect

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

func (*Changes) Reset

func (x *Changes) Reset()

func (*Changes) String

func (x *Changes) String() string

type Changes_Kind

type Changes_Kind int32
const (
	Changes_CREATE Changes_Kind = 0
	Changes_UPDATE Changes_Kind = 1
	Changes_DELETE Changes_Kind = 2
)

func (Changes_Kind) Descriptor

func (Changes_Kind) Enum

func (x Changes_Kind) Enum() *Changes_Kind

func (Changes_Kind) EnumDescriptor deprecated

func (Changes_Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Changes_Kind.Descriptor instead.

func (Changes_Kind) Number

func (Changes_Kind) String

func (x Changes_Kind) String() string

func (Changes_Kind) Type

type OdinClient

type OdinClient interface {
	Audit(ctx context.Context, in *AuditRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

OdinClient is the client API for Odin 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 NewOdinClient

func NewOdinClient(cc grpc.ClientConnInterface) OdinClient

type OdinServer

type OdinServer interface {
	Audit(context.Context, *AuditRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

OdinServer is the server API for Odin service. All implementations must embed UnimplementedOdinServer for forward compatibility

type UnimplementedOdinServer

type UnimplementedOdinServer struct {
}

UnimplementedOdinServer must be embedded to have forward compatible implementations.

func (UnimplementedOdinServer) Audit

type UnsafeOdinServer

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

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

type User

type User struct {
	Uid      string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Ip       string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetIp

func (x *User) GetIp() string

func (*User) GetUid

func (x *User) GetUid() string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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