protobuf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SlackUserResponse_Decision_name = map[int32]string{
		0: "DENY",
		1: "APPROVE",
	}
	SlackUserResponse_Decision_value = map[string]int32{
		"DENY":    0,
		"APPROVE": 1,
	}
)

Enum value maps for SlackUserResponse_Decision.

View Source
var Approuvez_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "approuvez.Approuvez",
	HandlerType: (*ApprouvezServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NewSession",
			Handler:    _Approuvez_NewSession_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "CreateStream",
			Handler:       _Approuvez_CreateStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/protobuf/approuvez.proto",
}

Approuvez_ServiceDesc is the grpc.ServiceDesc for Approuvez 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_pkg_protobuf_approuvez_proto protoreflect.FileDescriptor

Functions

func RegisterApprouvezServer

func RegisterApprouvezServer(s grpc.ServiceRegistrar, srv ApprouvezServer)

Types

type ApprouvezClient

type ApprouvezClient interface {
	NewSession(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Session, error)
	CreateStream(ctx context.Context, in *SlackUserRequest, opts ...grpc.CallOption) (Approuvez_CreateStreamClient, error)
}

ApprouvezClient is the client API for Approuvez 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 NewApprouvezClient

func NewApprouvezClient(cc grpc.ClientConnInterface) ApprouvezClient

type ApprouvezServer

type ApprouvezServer interface {
	NewSession(context.Context, *Empty) (*Session, error)
	CreateStream(*SlackUserRequest, Approuvez_CreateStreamServer) error
	// contains filtered or unexported methods
}

ApprouvezServer is the server API for Approuvez service. All implementations must embed UnimplementedApprouvezServer for forward compatibility

type Approuvez_CreateStreamClient

type Approuvez_CreateStreamClient interface {
	Recv() (*SlackUserResponse, error)
	grpc.ClientStream
}

type Approuvez_CreateStreamServer

type Approuvez_CreateStreamServer interface {
	Send(*SlackUserResponse) error
	grpc.ServerStream
}

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Session

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

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetId

func (x *Session) GetId() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type SlackUser

type SlackUser struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Name  string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SlackUser) Descriptor deprecated

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

Deprecated: Use SlackUser.ProtoReflect.Descriptor instead.

func (*SlackUser) GetEmail

func (x *SlackUser) GetEmail() string

func (*SlackUser) GetId

func (x *SlackUser) GetId() string

func (*SlackUser) GetName

func (x *SlackUser) GetName() string

func (*SlackUser) ProtoMessage

func (*SlackUser) ProtoMessage()

func (*SlackUser) ProtoReflect

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

func (*SlackUser) Reset

func (x *SlackUser) Reset()

func (*SlackUser) String

func (x *SlackUser) String() string

type SlackUserRequest

type SlackUserRequest struct {
	Session  *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	User     string   `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Message  string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	LinkName string   `protobuf:"bytes,4,opt,name=link_name,json=linkName,proto3" json:"link_name,omitempty"`
	LinkUrl  string   `protobuf:"bytes,5,opt,name=link_url,json=linkUrl,proto3" json:"link_url,omitempty"`
	// contains filtered or unexported fields
}

func (*SlackUserRequest) Descriptor deprecated

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

Deprecated: Use SlackUserRequest.ProtoReflect.Descriptor instead.

func (*SlackUserRequest) GetLinkName

func (x *SlackUserRequest) GetLinkName() string

func (*SlackUserRequest) GetLinkUrl

func (x *SlackUserRequest) GetLinkUrl() string

func (*SlackUserRequest) GetMessage

func (x *SlackUserRequest) GetMessage() string

func (*SlackUserRequest) GetSession

func (x *SlackUserRequest) GetSession() *Session

func (*SlackUserRequest) GetUser

func (x *SlackUserRequest) GetUser() string

func (*SlackUserRequest) ProtoMessage

func (*SlackUserRequest) ProtoMessage()

func (*SlackUserRequest) ProtoReflect

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

func (*SlackUserRequest) Reset

func (x *SlackUserRequest) Reset()

func (*SlackUserRequest) String

func (x *SlackUserRequest) String() string

type SlackUserResponse

type SlackUserResponse struct {
	User     *SlackUser                 `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Decision SlackUserResponse_Decision `protobuf:"varint,3,opt,name=decision,proto3,enum=approuvez.SlackUserResponse_Decision" json:"decision,omitempty"`
	// contains filtered or unexported fields
}

func (*SlackUserResponse) Descriptor deprecated

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

Deprecated: Use SlackUserResponse.ProtoReflect.Descriptor instead.

func (*SlackUserResponse) GetDecision

func (*SlackUserResponse) GetUser

func (x *SlackUserResponse) GetUser() *SlackUser

func (*SlackUserResponse) ProtoMessage

func (*SlackUserResponse) ProtoMessage()

func (*SlackUserResponse) ProtoReflect

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

func (*SlackUserResponse) Reset

func (x *SlackUserResponse) Reset()

func (*SlackUserResponse) String

func (x *SlackUserResponse) String() string

type SlackUserResponse_Decision

type SlackUserResponse_Decision int32
const (
	SlackUserResponse_DENY    SlackUserResponse_Decision = 0
	SlackUserResponse_APPROVE SlackUserResponse_Decision = 1
)

func (SlackUserResponse_Decision) Descriptor

func (SlackUserResponse_Decision) Enum

func (SlackUserResponse_Decision) EnumDescriptor deprecated

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

Deprecated: Use SlackUserResponse_Decision.Descriptor instead.

func (SlackUserResponse_Decision) Number

func (SlackUserResponse_Decision) String

func (SlackUserResponse_Decision) Type

type UnimplementedApprouvezServer

type UnimplementedApprouvezServer struct {
}

UnimplementedApprouvezServer must be embedded to have forward compatible implementations.

func (UnimplementedApprouvezServer) CreateStream

func (UnimplementedApprouvezServer) NewSession

type UnsafeApprouvezServer

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

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

Jump to

Keyboard shortcuts

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