admin

package
v0.0.0-...-b4fe549 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Admin_Process_FullMethodName      = "/admin.Admin/Process"
	Admin_Delete_FullMethodName       = "/admin.Admin/Delete"
	Admin_ProcessAll_FullMethodName   = "/admin.Admin/ProcessAll"
	Admin_ProcessHash_FullMethodName  = "/admin.Admin/ProcessHash"
	Admin_RunOperation_FullMethodName = "/admin.Admin/RunOperation"
	Admin_Role_FullMethodName         = "/admin.Admin/Role"
)

Variables

View Source
var (
	RoleRequest_Action_name = map[int32]string{
		0: "Add",
		1: "Remove",
	}
	RoleRequest_Action_value = map[string]int32{
		"Add":    0,
		"Remove": 1,
	}
)

Enum value maps for RoleRequest_Action.

View Source
var Admin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.Admin",
	HandlerType: (*AdminServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Process",
			Handler:    _Admin_Process_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Admin_Delete_Handler,
		},
		{
			MethodName: "ProcessAll",
			Handler:    _Admin_ProcessAll_Handler,
		},
		{
			MethodName: "ProcessHash",
			Handler:    _Admin_ProcessHash_Handler,
		},
		{
			MethodName: "RunOperation",
			Handler:    _Admin_RunOperation_Handler,
		},
		{
			MethodName: "Role",
			Handler:    _Admin_Role_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/admin/admin.proto",
}

Admin_ServiceDesc is the grpc.ServiceDesc for Admin 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_admin_admin_proto protoreflect.FileDescriptor

Functions

func RegisterAdminServer

func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)

Types

type AdminClient

type AdminClient interface {
	Process(ctx context.Context, in *ProcessRequest, opts ...grpc.CallOption) (*ProcessResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	ProcessAll(ctx context.Context, in *ProcessAllRequest, opts ...grpc.CallOption) (*ProcessAllResponse, error)
	ProcessHash(ctx context.Context, in *ProcessHashRequest, opts ...grpc.CallOption) (*ProcessHashResponse, error)
	RunOperation(ctx context.Context, in *RunOperationRequest, opts ...grpc.CallOption) (*RunOperationResponse, error)
	Role(ctx context.Context, in *RoleRequest, opts ...grpc.CallOption) (*RoleResponse, error)
}

AdminClient is the client API for Admin 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 NewAdminClient

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

type AdminServer

type AdminServer interface {
	Process(context.Context, *ProcessRequest) (*ProcessResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	ProcessAll(context.Context, *ProcessAllRequest) (*ProcessAllResponse, error)
	ProcessHash(context.Context, *ProcessHashRequest) (*ProcessHashResponse, error)
	RunOperation(context.Context, *RunOperationRequest) (*RunOperationResponse, error)
	Role(context.Context, *RoleRequest) (*RoleResponse, error)
	// contains filtered or unexported methods
}

AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility

type Config

type Config struct {
	Address     string
	DatabaseURL string

	DiscordBotToken string

	S3 *s3.Config
}

type DeleteRequest

type DeleteRequest struct {
	Encounter int32 `protobuf:"varint,1,opt,name=encounter,proto3" json:"encounter,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetEncounter

func (x *DeleteRequest) GetEncounter() int32

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type ProcessAllRequest

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

func (*ProcessAllRequest) Descriptor deprecated

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

Deprecated: Use ProcessAllRequest.ProtoReflect.Descriptor instead.

func (*ProcessAllRequest) ProtoMessage

func (*ProcessAllRequest) ProtoMessage()

func (*ProcessAllRequest) ProtoReflect

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

func (*ProcessAllRequest) Reset

func (x *ProcessAllRequest) Reset()

func (*ProcessAllRequest) String

func (x *ProcessAllRequest) String() string

type ProcessAllResponse

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

func (*ProcessAllResponse) Descriptor deprecated

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

Deprecated: Use ProcessAllResponse.ProtoReflect.Descriptor instead.

func (*ProcessAllResponse) ProtoMessage

func (*ProcessAllResponse) ProtoMessage()

func (*ProcessAllResponse) ProtoReflect

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

func (*ProcessAllResponse) Reset

func (x *ProcessAllResponse) Reset()

func (*ProcessAllResponse) String

func (x *ProcessAllResponse) String() string

type ProcessHashRequest

type ProcessHashRequest struct {
	Encounter int32 `protobuf:"varint,1,opt,name=encounter,proto3" json:"encounter,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessHashRequest) Descriptor deprecated

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

Deprecated: Use ProcessHashRequest.ProtoReflect.Descriptor instead.

func (*ProcessHashRequest) GetEncounter

func (x *ProcessHashRequest) GetEncounter() int32

func (*ProcessHashRequest) ProtoMessage

func (*ProcessHashRequest) ProtoMessage()

func (*ProcessHashRequest) ProtoReflect

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

func (*ProcessHashRequest) Reset

func (x *ProcessHashRequest) Reset()

func (*ProcessHashRequest) String

func (x *ProcessHashRequest) String() string

type ProcessHashResponse

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

func (*ProcessHashResponse) Descriptor deprecated

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

Deprecated: Use ProcessHashResponse.ProtoReflect.Descriptor instead.

func (*ProcessHashResponse) ProtoMessage

func (*ProcessHashResponse) ProtoMessage()

func (*ProcessHashResponse) ProtoReflect

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

func (*ProcessHashResponse) Reset

func (x *ProcessHashResponse) Reset()

func (*ProcessHashResponse) String

func (x *ProcessHashResponse) String() string

type ProcessRequest

type ProcessRequest struct {
	Encounter int32 `protobuf:"varint,1,opt,name=encounter,proto3" json:"encounter,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessRequest) Descriptor deprecated

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

Deprecated: Use ProcessRequest.ProtoReflect.Descriptor instead.

func (*ProcessRequest) GetEncounter

func (x *ProcessRequest) GetEncounter() int32

func (*ProcessRequest) ProtoMessage

func (*ProcessRequest) ProtoMessage()

func (*ProcessRequest) ProtoReflect

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

func (*ProcessRequest) Reset

func (x *ProcessRequest) Reset()

func (*ProcessRequest) String

func (x *ProcessRequest) String() string

type ProcessResponse

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

func (*ProcessResponse) Descriptor deprecated

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

Deprecated: Use ProcessResponse.ProtoReflect.Descriptor instead.

func (*ProcessResponse) ProtoMessage

func (*ProcessResponse) ProtoMessage()

func (*ProcessResponse) ProtoReflect

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

func (*ProcessResponse) Reset

func (x *ProcessResponse) Reset()

func (*ProcessResponse) String

func (x *ProcessResponse) String() string

type RoleRequest

type RoleRequest struct {
	Action  RoleRequest_Action `protobuf:"varint,1,opt,name=action,proto3,enum=admin.RoleRequest_Action" json:"action,omitempty"`
	Discord string             `protobuf:"bytes,2,opt,name=discord,proto3" json:"discord,omitempty"`
	Role    string             `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleRequest) Descriptor deprecated

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

Deprecated: Use RoleRequest.ProtoReflect.Descriptor instead.

func (*RoleRequest) GetAction

func (x *RoleRequest) GetAction() RoleRequest_Action

func (*RoleRequest) GetDiscord

func (x *RoleRequest) GetDiscord() string

func (*RoleRequest) GetRole

func (x *RoleRequest) GetRole() string

func (*RoleRequest) ProtoMessage

func (*RoleRequest) ProtoMessage()

func (*RoleRequest) ProtoReflect

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

func (*RoleRequest) Reset

func (x *RoleRequest) Reset()

func (*RoleRequest) String

func (x *RoleRequest) String() string

type RoleRequest_Action

type RoleRequest_Action int32
const (
	RoleRequest_Add    RoleRequest_Action = 0
	RoleRequest_Remove RoleRequest_Action = 1
)

func (RoleRequest_Action) Descriptor

func (RoleRequest_Action) Enum

func (RoleRequest_Action) EnumDescriptor deprecated

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

Deprecated: Use RoleRequest_Action.Descriptor instead.

func (RoleRequest_Action) Number

func (RoleRequest_Action) String

func (x RoleRequest_Action) String() string

func (RoleRequest_Action) Type

type RoleResponse

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

func (*RoleResponse) Descriptor deprecated

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

Deprecated: Use RoleResponse.ProtoReflect.Descriptor instead.

func (*RoleResponse) ProtoMessage

func (*RoleResponse) ProtoMessage()

func (*RoleResponse) ProtoReflect

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

func (*RoleResponse) Reset

func (x *RoleResponse) Reset()

func (*RoleResponse) String

func (x *RoleResponse) String() string

type RunOperationRequest

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

func (*RunOperationRequest) Descriptor deprecated

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

Deprecated: Use RunOperationRequest.ProtoReflect.Descriptor instead.

func (*RunOperationRequest) ProtoMessage

func (*RunOperationRequest) ProtoMessage()

func (*RunOperationRequest) ProtoReflect

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

func (*RunOperationRequest) Reset

func (x *RunOperationRequest) Reset()

func (*RunOperationRequest) String

func (x *RunOperationRequest) String() string

type RunOperationResponse

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

func (*RunOperationResponse) Descriptor deprecated

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

Deprecated: Use RunOperationResponse.ProtoReflect.Descriptor instead.

func (*RunOperationResponse) ProtoMessage

func (*RunOperationResponse) ProtoMessage()

func (*RunOperationResponse) ProtoReflect

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

func (*RunOperationResponse) Reset

func (x *RunOperationResponse) Reset()

func (*RunOperationResponse) String

func (x *RunOperationResponse) String() string

type Server

type Server struct {
	UnimplementedAdminServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(c *Config) *Server

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

func (*Server) Process

func (s *Server) Process(ctx context.Context, req *ProcessRequest) (*ProcessResponse, error)

func (*Server) ProcessAll

func (s *Server) ProcessAll(ctx context.Context, req *ProcessAllRequest) (*ProcessAllResponse, error)

func (*Server) ProcessHash

func (s *Server) ProcessHash(ctx context.Context, req *ProcessHashRequest) (*ProcessHashResponse, error)

func (*Server) Role

func (s *Server) Role(ctx context.Context, req *RoleRequest) (*RoleResponse, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) RunOperation

func (s *Server) RunOperation(ctx context.Context, req *RunOperationRequest) (*RunOperationResponse, error)

type UnimplementedAdminServer

type UnimplementedAdminServer struct {
}

UnimplementedAdminServer must be embedded to have forward compatible implementations.

func (UnimplementedAdminServer) Delete

func (UnimplementedAdminServer) Process

func (UnimplementedAdminServer) ProcessAll

func (UnimplementedAdminServer) ProcessHash

func (UnimplementedAdminServer) Role

func (UnimplementedAdminServer) RunOperation

type UnsafeAdminServer

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

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

Jump to

Keyboard shortcuts

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