Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
mydis.proto
It has these top-level messages:
Null Key Bool Expiration ByteValue IntValue FloatValue KeysList List ListItem ErrorHash StringHash Hash HashField HashFieldSet WatchRequest Event Permission ResponseHeader AuthEnableRequest AuthDisableRequest AuthenticateRequest AuthUserAddRequest AuthUserGetRequest AuthUserDeleteRequest AuthUserChangePasswordRequest AuthUserGrantRoleRequest AuthUserRevokeRoleRequest AuthRoleAddRequest AuthRoleGetRequest AuthUserListRequest AuthRoleListRequest AuthRoleDeleteRequest AuthRoleGrantPermissionRequest AuthRoleRevokePermissionRequest AuthEnableResponse AuthDisableResponse AuthenticateResponse AuthUserAddResponse AuthUserGetResponse AuthUserDeleteResponse AuthUserChangePasswordResponse AuthUserGrantRoleResponse AuthUserRevokeRoleResponse AuthRoleAddResponse AuthRoleGetResponse AuthRoleListResponse AuthUserListResponse AuthRoleDeleteResponse AuthRoleGrantPermissionResponse AuthRoleRevokePermissionResponse
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMydisHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMydisHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMydisServer(s *grpc.Server, srv MydisServer)
- type AuthDisableRequest
- type AuthDisableResponse
- type AuthEnableRequest
- type AuthEnableResponse
- type AuthRoleAddRequest
- type AuthRoleAddResponse
- type AuthRoleDeleteRequest
- type AuthRoleDeleteResponse
- type AuthRoleGetRequest
- type AuthRoleGetResponse
- type AuthRoleGrantPermissionRequest
- func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int)
- func (m *AuthRoleGrantPermissionRequest) GetName() string
- func (m *AuthRoleGrantPermissionRequest) GetPerm() *Permission
- func (*AuthRoleGrantPermissionRequest) ProtoMessage()
- func (m *AuthRoleGrantPermissionRequest) Reset()
- func (m *AuthRoleGrantPermissionRequest) String() string
- type AuthRoleGrantPermissionResponse
- func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int)
- func (m *AuthRoleGrantPermissionResponse) GetHeader() *ResponseHeader
- func (*AuthRoleGrantPermissionResponse) ProtoMessage()
- func (m *AuthRoleGrantPermissionResponse) Reset()
- func (m *AuthRoleGrantPermissionResponse) String() string
- type AuthRoleListRequest
- type AuthRoleListResponse
- type AuthRoleRevokePermissionRequest
- func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int)
- func (m *AuthRoleRevokePermissionRequest) GetKey() string
- func (m *AuthRoleRevokePermissionRequest) GetRangeEnd() string
- func (m *AuthRoleRevokePermissionRequest) GetRole() string
- func (*AuthRoleRevokePermissionRequest) ProtoMessage()
- func (m *AuthRoleRevokePermissionRequest) Reset()
- func (m *AuthRoleRevokePermissionRequest) String() string
- type AuthRoleRevokePermissionResponse
- func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int)
- func (m *AuthRoleRevokePermissionResponse) GetHeader() *ResponseHeader
- func (*AuthRoleRevokePermissionResponse) ProtoMessage()
- func (m *AuthRoleRevokePermissionResponse) Reset()
- func (m *AuthRoleRevokePermissionResponse) String() string
- type AuthUserAddRequest
- type AuthUserAddResponse
- type AuthUserChangePasswordRequest
- func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int)
- func (m *AuthUserChangePasswordRequest) GetName() string
- func (m *AuthUserChangePasswordRequest) GetPassword() string
- func (*AuthUserChangePasswordRequest) ProtoMessage()
- func (m *AuthUserChangePasswordRequest) Reset()
- func (m *AuthUserChangePasswordRequest) String() string
- type AuthUserChangePasswordResponse
- type AuthUserDeleteRequest
- type AuthUserDeleteResponse
- type AuthUserGetRequest
- type AuthUserGetResponse
- type AuthUserGrantRoleRequest
- func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int)
- func (m *AuthUserGrantRoleRequest) GetRole() string
- func (m *AuthUserGrantRoleRequest) GetUser() string
- func (*AuthUserGrantRoleRequest) ProtoMessage()
- func (m *AuthUserGrantRoleRequest) Reset()
- func (m *AuthUserGrantRoleRequest) String() string
- type AuthUserGrantRoleResponse
- type AuthUserListRequest
- type AuthUserListResponse
- type AuthUserRevokeRoleRequest
- func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int)
- func (m *AuthUserRevokeRoleRequest) GetName() string
- func (m *AuthUserRevokeRoleRequest) GetRole() string
- func (*AuthUserRevokeRoleRequest) ProtoMessage()
- func (m *AuthUserRevokeRoleRequest) Reset()
- func (m *AuthUserRevokeRoleRequest) String() string
- type AuthUserRevokeRoleResponse
- type AuthenticateRequest
- type AuthenticateResponse
- type Bool
- type ByteValue
- type ErrorHash
- type Event
- type Event_EventType
- type Expiration
- type FloatValue
- type Hash
- type HashField
- type HashFieldSet
- type IntValue
- type Key
- func (*Key) Descriptor() ([]byte, []int)
- func (m *Key) GetBlock() bool
- func (m *Key) GetBlockTimeout() int64
- func (m *Key) GetKey() string
- func (m *Key) GetLimit() int64
- func (m *Key) GetMaxCreateRevision() int64
- func (m *Key) GetMaxModRevision() int64
- func (m *Key) GetMinCreateRevision() int64
- func (m *Key) GetMinModRevision() int64
- func (m *Key) GetRevision() int64
- func (*Key) ProtoMessage()
- func (m *Key) Reset()
- func (m *Key) String() string
- type KeysList
- type List
- type ListItem
- type MydisClient
- type MydisServer
- type Mydis_WatchClient
- type Mydis_WatchServer
- type Null
- type Permission
- type Permission_Type
- type ResponseHeader
- func (*ResponseHeader) Descriptor() ([]byte, []int)
- func (m *ResponseHeader) GetClusterId() uint64
- func (m *ResponseHeader) GetMemberId() uint64
- func (m *ResponseHeader) GetRaftTerm() uint64
- func (m *ResponseHeader) GetRevision() int64
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) String() string
- type StringHash
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)
- func (m *WatchRequest) GetCancel() bool
- func (m *WatchRequest) GetId() int64
- func (m *WatchRequest) GetKey() string
- func (m *WatchRequest) GetPrefix() bool
- func (m *WatchRequest) GetRev() int64
- func (*WatchRequest) ProtoMessage()
- func (m *WatchRequest) Reset()
- func (m *WatchRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var Event_EventType_name = map[int32]string{
0: "PUT",
1: "DELETE",
}
var Event_EventType_value = map[string]int32{
"PUT": 0,
"DELETE": 1,
}
var Permission_Type_name = map[int32]string{
0: "READ",
1: "WRITE",
2: "READWRITE",
}
var Permission_Type_value = map[string]int32{
"READ": 0,
"WRITE": 1,
"READWRITE": 2,
}
Functions ¶
func RegisterMydisHandler ¶
RegisterMydisHandler registers the http handlers for service Mydis to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMydisHandlerFromEndpoint ¶
func RegisterMydisHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMydisHandlerFromEndpoint is same as RegisterMydisHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMydisServer ¶
func RegisterMydisServer(s *grpc.Server, srv MydisServer)
Types ¶
type AuthDisableRequest ¶
type AuthDisableRequest struct { }
func (*AuthDisableRequest) Descriptor ¶
func (*AuthDisableRequest) Descriptor() ([]byte, []int)
func (*AuthDisableRequest) ProtoMessage ¶
func (*AuthDisableRequest) ProtoMessage()
func (*AuthDisableRequest) Reset ¶
func (m *AuthDisableRequest) Reset()
func (*AuthDisableRequest) String ¶
func (m *AuthDisableRequest) String() string
type AuthDisableResponse ¶
type AuthDisableResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthDisableResponse) Descriptor ¶
func (*AuthDisableResponse) Descriptor() ([]byte, []int)
func (*AuthDisableResponse) GetHeader ¶
func (m *AuthDisableResponse) GetHeader() *ResponseHeader
func (*AuthDisableResponse) ProtoMessage ¶
func (*AuthDisableResponse) ProtoMessage()
func (*AuthDisableResponse) Reset ¶
func (m *AuthDisableResponse) Reset()
func (*AuthDisableResponse) String ¶
func (m *AuthDisableResponse) String() string
type AuthEnableRequest ¶
type AuthEnableRequest struct { }
func (*AuthEnableRequest) Descriptor ¶
func (*AuthEnableRequest) Descriptor() ([]byte, []int)
func (*AuthEnableRequest) ProtoMessage ¶
func (*AuthEnableRequest) ProtoMessage()
func (*AuthEnableRequest) Reset ¶
func (m *AuthEnableRequest) Reset()
func (*AuthEnableRequest) String ¶
func (m *AuthEnableRequest) String() string
type AuthEnableResponse ¶
type AuthEnableResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthEnableResponse) Descriptor ¶
func (*AuthEnableResponse) Descriptor() ([]byte, []int)
func (*AuthEnableResponse) GetHeader ¶
func (m *AuthEnableResponse) GetHeader() *ResponseHeader
func (*AuthEnableResponse) ProtoMessage ¶
func (*AuthEnableResponse) ProtoMessage()
func (*AuthEnableResponse) Reset ¶
func (m *AuthEnableResponse) Reset()
func (*AuthEnableResponse) String ¶
func (m *AuthEnableResponse) String() string
type AuthRoleAddRequest ¶
type AuthRoleAddRequest struct { // name is the name of the role to add to the authentication system. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` }
func (*AuthRoleAddRequest) Descriptor ¶
func (*AuthRoleAddRequest) Descriptor() ([]byte, []int)
func (*AuthRoleAddRequest) GetName ¶
func (m *AuthRoleAddRequest) GetName() string
func (*AuthRoleAddRequest) ProtoMessage ¶
func (*AuthRoleAddRequest) ProtoMessage()
func (*AuthRoleAddRequest) Reset ¶
func (m *AuthRoleAddRequest) Reset()
func (*AuthRoleAddRequest) String ¶
func (m *AuthRoleAddRequest) String() string
type AuthRoleAddResponse ¶
type AuthRoleAddResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthRoleAddResponse) Descriptor ¶
func (*AuthRoleAddResponse) Descriptor() ([]byte, []int)
func (*AuthRoleAddResponse) GetHeader ¶
func (m *AuthRoleAddResponse) GetHeader() *ResponseHeader
func (*AuthRoleAddResponse) ProtoMessage ¶
func (*AuthRoleAddResponse) ProtoMessage()
func (*AuthRoleAddResponse) Reset ¶
func (m *AuthRoleAddResponse) Reset()
func (*AuthRoleAddResponse) String ¶
func (m *AuthRoleAddResponse) String() string
type AuthRoleDeleteRequest ¶
type AuthRoleDeleteRequest struct {
Role string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"`
}
func (*AuthRoleDeleteRequest) Descriptor ¶
func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int)
func (*AuthRoleDeleteRequest) GetRole ¶
func (m *AuthRoleDeleteRequest) GetRole() string
func (*AuthRoleDeleteRequest) ProtoMessage ¶
func (*AuthRoleDeleteRequest) ProtoMessage()
func (*AuthRoleDeleteRequest) Reset ¶
func (m *AuthRoleDeleteRequest) Reset()
func (*AuthRoleDeleteRequest) String ¶
func (m *AuthRoleDeleteRequest) String() string
type AuthRoleDeleteResponse ¶
type AuthRoleDeleteResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthRoleDeleteResponse) Descriptor ¶
func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int)
func (*AuthRoleDeleteResponse) GetHeader ¶
func (m *AuthRoleDeleteResponse) GetHeader() *ResponseHeader
func (*AuthRoleDeleteResponse) ProtoMessage ¶
func (*AuthRoleDeleteResponse) ProtoMessage()
func (*AuthRoleDeleteResponse) Reset ¶
func (m *AuthRoleDeleteResponse) Reset()
func (*AuthRoleDeleteResponse) String ¶
func (m *AuthRoleDeleteResponse) String() string
type AuthRoleGetRequest ¶
type AuthRoleGetRequest struct {
Role string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"`
}
func (*AuthRoleGetRequest) Descriptor ¶
func (*AuthRoleGetRequest) Descriptor() ([]byte, []int)
func (*AuthRoleGetRequest) GetRole ¶
func (m *AuthRoleGetRequest) GetRole() string
func (*AuthRoleGetRequest) ProtoMessage ¶
func (*AuthRoleGetRequest) ProtoMessage()
func (*AuthRoleGetRequest) Reset ¶
func (m *AuthRoleGetRequest) Reset()
func (*AuthRoleGetRequest) String ¶
func (m *AuthRoleGetRequest) String() string
type AuthRoleGetResponse ¶
type AuthRoleGetResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Perm []*Permission `protobuf:"bytes,2,rep,name=perm" json:"perm,omitempty"` }
func (*AuthRoleGetResponse) Descriptor ¶
func (*AuthRoleGetResponse) Descriptor() ([]byte, []int)
func (*AuthRoleGetResponse) GetHeader ¶
func (m *AuthRoleGetResponse) GetHeader() *ResponseHeader
func (*AuthRoleGetResponse) GetPerm ¶
func (m *AuthRoleGetResponse) GetPerm() []*Permission
func (*AuthRoleGetResponse) ProtoMessage ¶
func (*AuthRoleGetResponse) ProtoMessage()
func (*AuthRoleGetResponse) Reset ¶
func (m *AuthRoleGetResponse) Reset()
func (*AuthRoleGetResponse) String ¶
func (m *AuthRoleGetResponse) String() string
type AuthRoleGrantPermissionRequest ¶
type AuthRoleGrantPermissionRequest struct { // name is the name of the role which will be granted the permission. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // perm is the permission to grant to the role. Perm *Permission `protobuf:"bytes,2,opt,name=perm" json:"perm,omitempty"` }
func (*AuthRoleGrantPermissionRequest) Descriptor ¶
func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int)
func (*AuthRoleGrantPermissionRequest) GetName ¶
func (m *AuthRoleGrantPermissionRequest) GetName() string
func (*AuthRoleGrantPermissionRequest) GetPerm ¶
func (m *AuthRoleGrantPermissionRequest) GetPerm() *Permission
func (*AuthRoleGrantPermissionRequest) ProtoMessage ¶
func (*AuthRoleGrantPermissionRequest) ProtoMessage()
func (*AuthRoleGrantPermissionRequest) Reset ¶
func (m *AuthRoleGrantPermissionRequest) Reset()
func (*AuthRoleGrantPermissionRequest) String ¶
func (m *AuthRoleGrantPermissionRequest) String() string
type AuthRoleGrantPermissionResponse ¶
type AuthRoleGrantPermissionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthRoleGrantPermissionResponse) Descriptor ¶
func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int)
func (*AuthRoleGrantPermissionResponse) GetHeader ¶
func (m *AuthRoleGrantPermissionResponse) GetHeader() *ResponseHeader
func (*AuthRoleGrantPermissionResponse) ProtoMessage ¶
func (*AuthRoleGrantPermissionResponse) ProtoMessage()
func (*AuthRoleGrantPermissionResponse) Reset ¶
func (m *AuthRoleGrantPermissionResponse) Reset()
func (*AuthRoleGrantPermissionResponse) String ¶
func (m *AuthRoleGrantPermissionResponse) String() string
type AuthRoleListRequest ¶
type AuthRoleListRequest struct { }
func (*AuthRoleListRequest) Descriptor ¶
func (*AuthRoleListRequest) Descriptor() ([]byte, []int)
func (*AuthRoleListRequest) ProtoMessage ¶
func (*AuthRoleListRequest) ProtoMessage()
func (*AuthRoleListRequest) Reset ¶
func (m *AuthRoleListRequest) Reset()
func (*AuthRoleListRequest) String ¶
func (m *AuthRoleListRequest) String() string
type AuthRoleListResponse ¶
type AuthRoleListResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Roles []string `protobuf:"bytes,2,rep,name=roles" json:"roles,omitempty"` }
func (*AuthRoleListResponse) Descriptor ¶
func (*AuthRoleListResponse) Descriptor() ([]byte, []int)
func (*AuthRoleListResponse) GetHeader ¶
func (m *AuthRoleListResponse) GetHeader() *ResponseHeader
func (*AuthRoleListResponse) GetRoles ¶
func (m *AuthRoleListResponse) GetRoles() []string
func (*AuthRoleListResponse) ProtoMessage ¶
func (*AuthRoleListResponse) ProtoMessage()
func (*AuthRoleListResponse) Reset ¶
func (m *AuthRoleListResponse) Reset()
func (*AuthRoleListResponse) String ¶
func (m *AuthRoleListResponse) String() string
type AuthRoleRevokePermissionRequest ¶
type AuthRoleRevokePermissionRequest struct { Role string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"` Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` RangeEnd string `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd" json:"range_end,omitempty"` }
func (*AuthRoleRevokePermissionRequest) Descriptor ¶
func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int)
func (*AuthRoleRevokePermissionRequest) GetKey ¶
func (m *AuthRoleRevokePermissionRequest) GetKey() string
func (*AuthRoleRevokePermissionRequest) GetRangeEnd ¶
func (m *AuthRoleRevokePermissionRequest) GetRangeEnd() string
func (*AuthRoleRevokePermissionRequest) GetRole ¶
func (m *AuthRoleRevokePermissionRequest) GetRole() string
func (*AuthRoleRevokePermissionRequest) ProtoMessage ¶
func (*AuthRoleRevokePermissionRequest) ProtoMessage()
func (*AuthRoleRevokePermissionRequest) Reset ¶
func (m *AuthRoleRevokePermissionRequest) Reset()
func (*AuthRoleRevokePermissionRequest) String ¶
func (m *AuthRoleRevokePermissionRequest) String() string
type AuthRoleRevokePermissionResponse ¶
type AuthRoleRevokePermissionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthRoleRevokePermissionResponse) Descriptor ¶
func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int)
func (*AuthRoleRevokePermissionResponse) GetHeader ¶
func (m *AuthRoleRevokePermissionResponse) GetHeader() *ResponseHeader
func (*AuthRoleRevokePermissionResponse) ProtoMessage ¶
func (*AuthRoleRevokePermissionResponse) ProtoMessage()
func (*AuthRoleRevokePermissionResponse) Reset ¶
func (m *AuthRoleRevokePermissionResponse) Reset()
func (*AuthRoleRevokePermissionResponse) String ¶
func (m *AuthRoleRevokePermissionResponse) String() string
type AuthUserAddRequest ¶
type AuthUserAddRequest struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func (*AuthUserAddRequest) Descriptor ¶
func (*AuthUserAddRequest) Descriptor() ([]byte, []int)
func (*AuthUserAddRequest) GetName ¶
func (m *AuthUserAddRequest) GetName() string
func (*AuthUserAddRequest) GetPassword ¶
func (m *AuthUserAddRequest) GetPassword() string
func (*AuthUserAddRequest) ProtoMessage ¶
func (*AuthUserAddRequest) ProtoMessage()
func (*AuthUserAddRequest) Reset ¶
func (m *AuthUserAddRequest) Reset()
func (*AuthUserAddRequest) String ¶
func (m *AuthUserAddRequest) String() string
type AuthUserAddResponse ¶
type AuthUserAddResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthUserAddResponse) Descriptor ¶
func (*AuthUserAddResponse) Descriptor() ([]byte, []int)
func (*AuthUserAddResponse) GetHeader ¶
func (m *AuthUserAddResponse) GetHeader() *ResponseHeader
func (*AuthUserAddResponse) ProtoMessage ¶
func (*AuthUserAddResponse) ProtoMessage()
func (*AuthUserAddResponse) Reset ¶
func (m *AuthUserAddResponse) Reset()
func (*AuthUserAddResponse) String ¶
func (m *AuthUserAddResponse) String() string
type AuthUserChangePasswordRequest ¶
type AuthUserChangePasswordRequest struct { // name is the name of the user whose password is being changed. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // password is the new password for the user. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func (*AuthUserChangePasswordRequest) Descriptor ¶
func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int)
func (*AuthUserChangePasswordRequest) GetName ¶
func (m *AuthUserChangePasswordRequest) GetName() string
func (*AuthUserChangePasswordRequest) GetPassword ¶
func (m *AuthUserChangePasswordRequest) GetPassword() string
func (*AuthUserChangePasswordRequest) ProtoMessage ¶
func (*AuthUserChangePasswordRequest) ProtoMessage()
func (*AuthUserChangePasswordRequest) Reset ¶
func (m *AuthUserChangePasswordRequest) Reset()
func (*AuthUserChangePasswordRequest) String ¶
func (m *AuthUserChangePasswordRequest) String() string
type AuthUserChangePasswordResponse ¶
type AuthUserChangePasswordResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthUserChangePasswordResponse) Descriptor ¶
func (*AuthUserChangePasswordResponse) Descriptor() ([]byte, []int)
func (*AuthUserChangePasswordResponse) GetHeader ¶
func (m *AuthUserChangePasswordResponse) GetHeader() *ResponseHeader
func (*AuthUserChangePasswordResponse) ProtoMessage ¶
func (*AuthUserChangePasswordResponse) ProtoMessage()
func (*AuthUserChangePasswordResponse) Reset ¶
func (m *AuthUserChangePasswordResponse) Reset()
func (*AuthUserChangePasswordResponse) String ¶
func (m *AuthUserChangePasswordResponse) String() string
type AuthUserDeleteRequest ¶
type AuthUserDeleteRequest struct { // name is the name of the user to delete. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` }
func (*AuthUserDeleteRequest) Descriptor ¶
func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int)
func (*AuthUserDeleteRequest) GetName ¶
func (m *AuthUserDeleteRequest) GetName() string
func (*AuthUserDeleteRequest) ProtoMessage ¶
func (*AuthUserDeleteRequest) ProtoMessage()
func (*AuthUserDeleteRequest) Reset ¶
func (m *AuthUserDeleteRequest) Reset()
func (*AuthUserDeleteRequest) String ¶
func (m *AuthUserDeleteRequest) String() string
type AuthUserDeleteResponse ¶
type AuthUserDeleteResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthUserDeleteResponse) Descriptor ¶
func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int)
func (*AuthUserDeleteResponse) GetHeader ¶
func (m *AuthUserDeleteResponse) GetHeader() *ResponseHeader
func (*AuthUserDeleteResponse) ProtoMessage ¶
func (*AuthUserDeleteResponse) ProtoMessage()
func (*AuthUserDeleteResponse) Reset ¶
func (m *AuthUserDeleteResponse) Reset()
func (*AuthUserDeleteResponse) String ¶
func (m *AuthUserDeleteResponse) String() string
type AuthUserGetRequest ¶
type AuthUserGetRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*AuthUserGetRequest) Descriptor ¶
func (*AuthUserGetRequest) Descriptor() ([]byte, []int)
func (*AuthUserGetRequest) GetName ¶
func (m *AuthUserGetRequest) GetName() string
func (*AuthUserGetRequest) ProtoMessage ¶
func (*AuthUserGetRequest) ProtoMessage()
func (*AuthUserGetRequest) Reset ¶
func (m *AuthUserGetRequest) Reset()
func (*AuthUserGetRequest) String ¶
func (m *AuthUserGetRequest) String() string
type AuthUserGetResponse ¶
type AuthUserGetResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Roles []string `protobuf:"bytes,2,rep,name=roles" json:"roles,omitempty"` }
func (*AuthUserGetResponse) Descriptor ¶
func (*AuthUserGetResponse) Descriptor() ([]byte, []int)
func (*AuthUserGetResponse) GetHeader ¶
func (m *AuthUserGetResponse) GetHeader() *ResponseHeader
func (*AuthUserGetResponse) GetRoles ¶
func (m *AuthUserGetResponse) GetRoles() []string
func (*AuthUserGetResponse) ProtoMessage ¶
func (*AuthUserGetResponse) ProtoMessage()
func (*AuthUserGetResponse) Reset ¶
func (m *AuthUserGetResponse) Reset()
func (*AuthUserGetResponse) String ¶
func (m *AuthUserGetResponse) String() string
type AuthUserGrantRoleRequest ¶
type AuthUserGrantRoleRequest struct { // user is the name of the user which should be granted a given role. User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` // role is the name of the role to grant to the user. Role string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"` }
func (*AuthUserGrantRoleRequest) Descriptor ¶
func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int)
func (*AuthUserGrantRoleRequest) GetRole ¶
func (m *AuthUserGrantRoleRequest) GetRole() string
func (*AuthUserGrantRoleRequest) GetUser ¶
func (m *AuthUserGrantRoleRequest) GetUser() string
func (*AuthUserGrantRoleRequest) ProtoMessage ¶
func (*AuthUserGrantRoleRequest) ProtoMessage()
func (*AuthUserGrantRoleRequest) Reset ¶
func (m *AuthUserGrantRoleRequest) Reset()
func (*AuthUserGrantRoleRequest) String ¶
func (m *AuthUserGrantRoleRequest) String() string
type AuthUserGrantRoleResponse ¶
type AuthUserGrantRoleResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthUserGrantRoleResponse) Descriptor ¶
func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int)
func (*AuthUserGrantRoleResponse) GetHeader ¶
func (m *AuthUserGrantRoleResponse) GetHeader() *ResponseHeader
func (*AuthUserGrantRoleResponse) ProtoMessage ¶
func (*AuthUserGrantRoleResponse) ProtoMessage()
func (*AuthUserGrantRoleResponse) Reset ¶
func (m *AuthUserGrantRoleResponse) Reset()
func (*AuthUserGrantRoleResponse) String ¶
func (m *AuthUserGrantRoleResponse) String() string
type AuthUserListRequest ¶
type AuthUserListRequest struct { }
func (*AuthUserListRequest) Descriptor ¶
func (*AuthUserListRequest) Descriptor() ([]byte, []int)
func (*AuthUserListRequest) ProtoMessage ¶
func (*AuthUserListRequest) ProtoMessage()
func (*AuthUserListRequest) Reset ¶
func (m *AuthUserListRequest) Reset()
func (*AuthUserListRequest) String ¶
func (m *AuthUserListRequest) String() string
type AuthUserListResponse ¶
type AuthUserListResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Users []string `protobuf:"bytes,2,rep,name=users" json:"users,omitempty"` }
func (*AuthUserListResponse) Descriptor ¶
func (*AuthUserListResponse) Descriptor() ([]byte, []int)
func (*AuthUserListResponse) GetHeader ¶
func (m *AuthUserListResponse) GetHeader() *ResponseHeader
func (*AuthUserListResponse) GetUsers ¶
func (m *AuthUserListResponse) GetUsers() []string
func (*AuthUserListResponse) ProtoMessage ¶
func (*AuthUserListResponse) ProtoMessage()
func (*AuthUserListResponse) Reset ¶
func (m *AuthUserListResponse) Reset()
func (*AuthUserListResponse) String ¶
func (m *AuthUserListResponse) String() string
type AuthUserRevokeRoleRequest ¶
type AuthUserRevokeRoleRequest struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Role string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"` }
func (*AuthUserRevokeRoleRequest) Descriptor ¶
func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int)
func (*AuthUserRevokeRoleRequest) GetName ¶
func (m *AuthUserRevokeRoleRequest) GetName() string
func (*AuthUserRevokeRoleRequest) GetRole ¶
func (m *AuthUserRevokeRoleRequest) GetRole() string
func (*AuthUserRevokeRoleRequest) ProtoMessage ¶
func (*AuthUserRevokeRoleRequest) ProtoMessage()
func (*AuthUserRevokeRoleRequest) Reset ¶
func (m *AuthUserRevokeRoleRequest) Reset()
func (*AuthUserRevokeRoleRequest) String ¶
func (m *AuthUserRevokeRoleRequest) String() string
type AuthUserRevokeRoleResponse ¶
type AuthUserRevokeRoleResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*AuthUserRevokeRoleResponse) Descriptor ¶
func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int)
func (*AuthUserRevokeRoleResponse) GetHeader ¶
func (m *AuthUserRevokeRoleResponse) GetHeader() *ResponseHeader
func (*AuthUserRevokeRoleResponse) ProtoMessage ¶
func (*AuthUserRevokeRoleResponse) ProtoMessage()
func (*AuthUserRevokeRoleResponse) Reset ¶
func (m *AuthUserRevokeRoleResponse) Reset()
func (*AuthUserRevokeRoleResponse) String ¶
func (m *AuthUserRevokeRoleResponse) String() string
type AuthenticateRequest ¶
type AuthenticateRequest struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func (*AuthenticateRequest) Descriptor ¶
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
func (*AuthenticateRequest) GetName ¶
func (m *AuthenticateRequest) GetName() string
func (*AuthenticateRequest) GetPassword ¶
func (m *AuthenticateRequest) GetPassword() string
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) Reset ¶
func (m *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (m *AuthenticateRequest) String() string
type AuthenticateResponse ¶
type AuthenticateResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` // token is an authorized token that can be used in succeeding RPCs Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` }
func (*AuthenticateResponse) Descriptor ¶
func (*AuthenticateResponse) Descriptor() ([]byte, []int)
func (*AuthenticateResponse) GetHeader ¶
func (m *AuthenticateResponse) GetHeader() *ResponseHeader
func (*AuthenticateResponse) GetToken ¶
func (m *AuthenticateResponse) GetToken() string
func (*AuthenticateResponse) ProtoMessage ¶
func (*AuthenticateResponse) ProtoMessage()
func (*AuthenticateResponse) Reset ¶
func (m *AuthenticateResponse) Reset()
func (*AuthenticateResponse) String ¶
func (m *AuthenticateResponse) String() string
type Bool ¶
type Bool struct {
Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}
Bool object.
func (*Bool) Descriptor ¶
func (*Bool) ProtoMessage ¶
func (*Bool) ProtoMessage()
type ByteValue ¶
type ByteValue struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
ByteValue object.
func (*ByteValue) Descriptor ¶
func (*ByteValue) ProtoMessage ¶
func (*ByteValue) ProtoMessage()
type ErrorHash ¶
ErrorHash object.
func (*ErrorHash) Descriptor ¶
func (*ErrorHash) ProtoMessage ¶
func (*ErrorHash) ProtoMessage()
type Event ¶
type Event struct { Type Event_EventType `protobuf:"varint,1,opt,name=type,enum=pb.Event_EventType" json:"type,omitempty"` Current *ByteValue `protobuf:"bytes,3,opt,name=current" json:"current,omitempty"` Previous *ByteValue `protobuf:"bytes,4,opt,name=previous" json:"previous,omitempty"` }
Event object.
func (*Event) Descriptor ¶
func (*Event) GetCurrent ¶
func (*Event) GetPrevious ¶
func (*Event) GetType ¶
func (m *Event) GetType() Event_EventType
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
type Event_EventType ¶
type Event_EventType int32
const ( Event_PUT Event_EventType = 0 Event_DELETE Event_EventType = 1 )
func (Event_EventType) EnumDescriptor ¶
func (Event_EventType) EnumDescriptor() ([]byte, []int)
func (Event_EventType) String ¶
func (x Event_EventType) String() string
type Expiration ¶
type Expiration struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Exp int64 `protobuf:"zigzag64,2,opt,name=exp" json:"exp,omitempty"` }
Expiration object.
func (*Expiration) Descriptor ¶
func (*Expiration) Descriptor() ([]byte, []int)
func (*Expiration) GetExp ¶
func (m *Expiration) GetExp() int64
func (*Expiration) GetKey ¶
func (m *Expiration) GetKey() string
func (*Expiration) ProtoMessage ¶
func (*Expiration) ProtoMessage()
func (*Expiration) Reset ¶
func (m *Expiration) Reset()
func (*Expiration) String ¶
func (m *Expiration) String() string
type FloatValue ¶
type FloatValue struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` }
FloatValue object.
func (*FloatValue) Descriptor ¶
func (*FloatValue) Descriptor() ([]byte, []int)
func (*FloatValue) GetKey ¶
func (m *FloatValue) GetKey() string
func (*FloatValue) GetValue ¶
func (m *FloatValue) GetValue() float64
func (*FloatValue) ProtoMessage ¶
func (*FloatValue) ProtoMessage()
func (*FloatValue) Reset ¶
func (m *FloatValue) Reset()
func (*FloatValue) String ¶
func (m *FloatValue) String() string
type Hash ¶
type Hash struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value map[string][]byte `` /* 137-byte string literal not displayed */ }
Hash object.
func (*Hash) Descriptor ¶
func (*Hash) ProtoMessage ¶
func (*Hash) ProtoMessage()
type HashField ¶
type HashField struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Field string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` }
HashField object.
func (*HashField) Descriptor ¶
func (*HashField) ProtoMessage ¶
func (*HashField) ProtoMessage()
type HashFieldSet ¶
type HashFieldSet struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Field []string `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Value [][]byte `protobuf:"bytes,3,rep,name=value,proto3" json:"value,omitempty"` }
HashFieldSet object.
func (*HashFieldSet) Descriptor ¶
func (*HashFieldSet) Descriptor() ([]byte, []int)
func (*HashFieldSet) GetField ¶
func (m *HashFieldSet) GetField() []string
func (*HashFieldSet) GetKey ¶
func (m *HashFieldSet) GetKey() string
func (*HashFieldSet) GetValue ¶
func (m *HashFieldSet) GetValue() [][]byte
func (*HashFieldSet) ProtoMessage ¶
func (*HashFieldSet) ProtoMessage()
func (*HashFieldSet) Reset ¶
func (m *HashFieldSet) Reset()
func (*HashFieldSet) String ¶
func (m *HashFieldSet) String() string
type IntValue ¶
type IntValue struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value int64 `protobuf:"zigzag64,2,opt,name=value" json:"value,omitempty"` }
IntValue object.
func (*IntValue) Descriptor ¶
func (*IntValue) ProtoMessage ¶
func (*IntValue) ProtoMessage()
type Key ¶
type Key struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"` Revision int64 `protobuf:"varint,4,opt,name=revision" json:"revision,omitempty"` MinModRevision int64 `protobuf:"varint,10,opt,name=minModRevision" json:"minModRevision,omitempty"` MaxModRevision int64 `protobuf:"varint,11,opt,name=maxModRevision" json:"maxModRevision,omitempty"` MinCreateRevision int64 `protobuf:"varint,12,opt,name=minCreateRevision" json:"minCreateRevision,omitempty"` MaxCreateRevision int64 `protobuf:"varint,13,opt,name=maxCreateRevision" json:"maxCreateRevision,omitempty"` Block bool `protobuf:"varint,14,opt,name=block" json:"block,omitempty"` BlockTimeout int64 `protobuf:"varint,15,opt,name=blockTimeout" json:"blockTimeout,omitempty"` }
Key object.
func (*Key) Descriptor ¶
func (*Key) GetBlockTimeout ¶
func (*Key) GetMaxCreateRevision ¶
func (*Key) GetMaxModRevision ¶
func (*Key) GetMinCreateRevision ¶
func (*Key) GetMinModRevision ¶
func (*Key) GetRevision ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
type KeysList ¶
type KeysList struct {
Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
}
KeysList object.
func (*KeysList) Descriptor ¶
func (*KeysList) ProtoMessage ¶
func (*KeysList) ProtoMessage()
type List ¶
type List struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value [][]byte `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"` }
List object.
func (*List) Descriptor ¶
func (*List) ProtoMessage ¶
func (*List) ProtoMessage()
type ListItem ¶
type ListItem struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Index int64 `protobuf:"varint,2,opt,name=index" json:"index,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` }
ListItem object.
func (*ListItem) Descriptor ¶
func (*ListItem) ProtoMessage ¶
func (*ListItem) ProtoMessage()
type MydisClient ¶
type MydisClient interface { // -- core functions // Keys returns a list of valid keys. Keys(ctx context.Context, in *Null, opts ...grpc.CallOption) (*KeysList, error) // KeysWithPrefix returns a list of keys with the given prefix. KeysWithPrefix(ctx context.Context, in *Key, opts ...grpc.CallOption) (*KeysList, error) // Has checks if the cache has the given key and that it is not expired. Has(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Bool, error) // SetExpire sets the expiration on a key. SetExpire(ctx context.Context, in *Expiration, opts ...grpc.CallOption) (*Null, error) // Lock a key from being modified. Lock(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Null, error) // LockWithTimeout locks a key, waiting for the given number of seconds if already locked before returning an error. LockWithTimeout(ctx context.Context, in *Expiration, opts ...grpc.CallOption) (*Null, error) // Unlock a key for modifications. Unlock(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Null, error) // UnlockThenSet unlocks a key, then immediately sets its byte array value. UnlockThenSet(ctx context.Context, in *ByteValue, opts ...grpc.CallOption) (*Null, error) // UnlockThenSetList unlocks a key, then immediately sets its list value. UnlockThenSetList(ctx context.Context, in *List, opts ...grpc.CallOption) (*Null, error) // Delete removes a key from the cache. Delete(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Null, error) // Clear the cache. Clear(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Null, error) // -- bytes functions // Get gets the value for the given key as a byte slice. Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*ByteValue, error) // GetMany gets a list of values from the cache. GetMany(ctx context.Context, in *KeysList, opts ...grpc.CallOption) (*Hash, error) // GetWithPrefix returns the keys with the given prefix. GetWithPrefix(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Hash, error) // Set sets the byte value. Set(ctx context.Context, in *ByteValue, opts ...grpc.CallOption) (*Null, error) // SetNX sets a value only if the key doesn't exist, returns true if changed. SetNX(ctx context.Context, in *ByteValue, opts ...grpc.CallOption) (*Bool, error) // SetMany values, returning a map[key]errorText for any errors. SetMany(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*ErrorHash, error) // Length returns the length of the value for the given key. Length(ctx context.Context, in *Key, opts ...grpc.CallOption) (*IntValue, error) // -- number functions // GetInt gets an integer value for the given key. GetInt(ctx context.Context, in *Key, opts ...grpc.CallOption) (*IntValue, error) // GetFloat gets a float value for the given key. GetFloat(ctx context.Context, in *Key, opts ...grpc.CallOption) (*FloatValue, error) // SetInt sets an integer. SetInt(ctx context.Context, in *IntValue, opts ...grpc.CallOption) (*Null, error) // SetFloat sets a float. SetFloat(ctx context.Context, in *FloatValue, opts ...grpc.CallOption) (*Null, error) // IncrementInt increment an integer stored at the given key by the given number and returns new value. IncrementInt(ctx context.Context, in *IntValue, opts ...grpc.CallOption) (*IntValue, error) // DecrementInt decrements an integer stored at the given key by the given number and returns new value. DecrementInt(ctx context.Context, in *IntValue, opts ...grpc.CallOption) (*IntValue, error) // IncrementFloat increment a float stored at the given key by the given number and returns new value. IncrementFloat(ctx context.Context, in *FloatValue, opts ...grpc.CallOption) (*FloatValue, error) // DecrementFloat decrements a float stored at the given key by the given number and returns new value. DecrementFloat(ctx context.Context, in *FloatValue, opts ...grpc.CallOption) (*FloatValue, error) // -- list functions // GetList gets a list from the cache. GetList(ctx context.Context, in *Key, opts ...grpc.CallOption) (*List, error) // GetListItem gets a single item from a list by index, supports negative indexing. GetListItem(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*ByteValue, error) // SetList sets a list in the cache. SetList(ctx context.Context, in *List, opts ...grpc.CallOption) (*Null, error) // SetListItem sets a single item in a list by index. SetListItem(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*Null, error) // ListLength returns the number of items in a list. ListLength(ctx context.Context, in *Key, opts ...grpc.CallOption) (*IntValue, error) // ListLimit sets the maximum length of a list, removing items from the top once limit is reached. ListLimit(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*Null, error) // ListInsert inserts a new item at the given index in the list. ListInsert(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*Null, error) // ListAppend inserts a new item at the end of the list. ListAppend(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*Null, error) // ListPopLeft returns and removes the first item in a list. ListPopLeft(ctx context.Context, in *Key, opts ...grpc.CallOption) (*ByteValue, error) // ListPopRight returns and removes the last item in a list. ListPopRight(ctx context.Context, in *Key, opts ...grpc.CallOption) (*ByteValue, error) // ListHas determines if a list contains an item, returns index or -1 if not found. ListHas(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*IntValue, error) // ListDelete removes an item from a list by index. ListDelete(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*Null, error) // ListDeleteItem removes the first occurrence of value from a list, returns index of removed item or -1 for not found. ListDeleteItem(ctx context.Context, in *ListItem, opts ...grpc.CallOption) (*IntValue, error) // -- hash functions // GetHash gets a hash from the cache. GetHash(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Hash, error) // GetHashField gets a single value in a hash. GetHashField(ctx context.Context, in *HashField, opts ...grpc.CallOption) (*ByteValue, error) // GetHashFields gets multiple hash values. GetHashFields(ctx context.Context, in *HashFieldSet, opts ...grpc.CallOption) (*Hash, error) // HashHas determines if a hash has a given field. HashHas(ctx context.Context, in *HashField, opts ...grpc.CallOption) (*Bool, error) // HashLength returns the number of fields in a hash. HashLength(ctx context.Context, in *Key, opts ...grpc.CallOption) (*IntValue, error) // HashFields gets a list of the fields in a hash. HashFields(ctx context.Context, in *Key, opts ...grpc.CallOption) (*KeysList, error) // HashValues gets a list of the values in a hash. HashValues(ctx context.Context, in *Key, opts ...grpc.CallOption) (*List, error) // SetHash sets the value of a hash. SetHash(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*Null, error) // SetHashField sets a single value in a hash. SetHashField(ctx context.Context, in *HashField, opts ...grpc.CallOption) (*Null, error) // SetHashFields sets multiple values in a hash. SetHashFields(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*Null, error) // DelHashField deletes a field from a hash. DelHashField(ctx context.Context, in *HashField, opts ...grpc.CallOption) (*Null, error) // -- push functions // Watch for changes to a key. Watch(ctx context.Context, opts ...grpc.CallOption) (Mydis_WatchClient, error) // -- auth passthrough functions // AuthEnable enables authentication. AuthEnable(ctx context.Context, in *AuthEnableRequest, opts ...grpc.CallOption) (*AuthEnableResponse, error) // AuthDisable disables authentication. AuthDisable(ctx context.Context, in *AuthDisableRequest, opts ...grpc.CallOption) (*AuthDisableResponse, error) // Authenticate processes an authenticate request. Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) // UserAdd adds a new user. UserAdd(ctx context.Context, in *AuthUserAddRequest, opts ...grpc.CallOption) (*AuthUserAddResponse, error) // UserGet gets detailed user information. UserGet(ctx context.Context, in *AuthUserGetRequest, opts ...grpc.CallOption) (*AuthUserGetResponse, error) // UserList gets a list of all users. UserList(ctx context.Context, in *AuthUserListRequest, opts ...grpc.CallOption) (*AuthUserListResponse, error) // UserDelete deletes a specified user. UserDelete(ctx context.Context, in *AuthUserDeleteRequest, opts ...grpc.CallOption) (*AuthUserDeleteResponse, error) // UserChangePassword changes the password of a specified user. UserChangePassword(ctx context.Context, in *AuthUserChangePasswordRequest, opts ...grpc.CallOption) (*AuthUserChangePasswordResponse, error) // UserGrantRole grants a role to a specified user. UserGrantRole(ctx context.Context, in *AuthUserGrantRoleRequest, opts ...grpc.CallOption) (*AuthUserGrantRoleResponse, error) // UserRevokeRole revokes a role of specified user. UserRevokeRole(ctx context.Context, in *AuthUserRevokeRoleRequest, opts ...grpc.CallOption) (*AuthUserRevokeRoleResponse, error) // RoleAdd adds a new role. RoleAdd(ctx context.Context, in *AuthRoleAddRequest, opts ...grpc.CallOption) (*AuthRoleAddResponse, error) // RoleGet gets detailed role information. RoleGet(ctx context.Context, in *AuthRoleGetRequest, opts ...grpc.CallOption) (*AuthRoleGetResponse, error) // RoleList gets lists of all roles. RoleList(ctx context.Context, in *AuthRoleListRequest, opts ...grpc.CallOption) (*AuthRoleListResponse, error) // RoleDelete deletes a specified role. RoleDelete(ctx context.Context, in *AuthRoleDeleteRequest, opts ...grpc.CallOption) (*AuthRoleDeleteResponse, error) // RoleGrantPermission grants a permission of a specified key or range to a specified role. RoleGrantPermission(ctx context.Context, in *AuthRoleGrantPermissionRequest, opts ...grpc.CallOption) (*AuthRoleGrantPermissionResponse, error) // RoleRevokePermission revokes a key or range permission of a specified role. RoleRevokePermission(ctx context.Context, in *AuthRoleRevokePermissionRequest, opts ...grpc.CallOption) (*AuthRoleRevokePermissionResponse, error) }
func NewMydisClient ¶
func NewMydisClient(cc *grpc.ClientConn) MydisClient
type MydisServer ¶
type MydisServer interface { // -- core functions // Keys returns a list of valid keys. Keys(context.Context, *Null) (*KeysList, error) // KeysWithPrefix returns a list of keys with the given prefix. KeysWithPrefix(context.Context, *Key) (*KeysList, error) // Has checks if the cache has the given key and that it is not expired. Has(context.Context, *Key) (*Bool, error) // SetExpire sets the expiration on a key. SetExpire(context.Context, *Expiration) (*Null, error) // Lock a key from being modified. Lock(context.Context, *Key) (*Null, error) // LockWithTimeout locks a key, waiting for the given number of seconds if already locked before returning an error. LockWithTimeout(context.Context, *Expiration) (*Null, error) // Unlock a key for modifications. Unlock(context.Context, *Key) (*Null, error) // UnlockThenSet unlocks a key, then immediately sets its byte array value. UnlockThenSet(context.Context, *ByteValue) (*Null, error) // UnlockThenSetList unlocks a key, then immediately sets its list value. UnlockThenSetList(context.Context, *List) (*Null, error) // Delete removes a key from the cache. Delete(context.Context, *Key) (*Null, error) // Clear the cache. Clear(context.Context, *Null) (*Null, error) // -- bytes functions // Get gets the value for the given key as a byte slice. Get(context.Context, *Key) (*ByteValue, error) // GetMany gets a list of values from the cache. GetMany(context.Context, *KeysList) (*Hash, error) // GetWithPrefix returns the keys with the given prefix. GetWithPrefix(context.Context, *Key) (*Hash, error) // Set sets the byte value. Set(context.Context, *ByteValue) (*Null, error) // SetNX sets a value only if the key doesn't exist, returns true if changed. SetNX(context.Context, *ByteValue) (*Bool, error) // SetMany values, returning a map[key]errorText for any errors. SetMany(context.Context, *Hash) (*ErrorHash, error) // Length returns the length of the value for the given key. Length(context.Context, *Key) (*IntValue, error) // -- number functions // GetInt gets an integer value for the given key. GetInt(context.Context, *Key) (*IntValue, error) // GetFloat gets a float value for the given key. GetFloat(context.Context, *Key) (*FloatValue, error) // SetInt sets an integer. SetInt(context.Context, *IntValue) (*Null, error) // SetFloat sets a float. SetFloat(context.Context, *FloatValue) (*Null, error) // IncrementInt increment an integer stored at the given key by the given number and returns new value. IncrementInt(context.Context, *IntValue) (*IntValue, error) // DecrementInt decrements an integer stored at the given key by the given number and returns new value. DecrementInt(context.Context, *IntValue) (*IntValue, error) // IncrementFloat increment a float stored at the given key by the given number and returns new value. IncrementFloat(context.Context, *FloatValue) (*FloatValue, error) // DecrementFloat decrements a float stored at the given key by the given number and returns new value. DecrementFloat(context.Context, *FloatValue) (*FloatValue, error) // -- list functions // GetList gets a list from the cache. GetList(context.Context, *Key) (*List, error) // GetListItem gets a single item from a list by index, supports negative indexing. GetListItem(context.Context, *ListItem) (*ByteValue, error) // SetList sets a list in the cache. SetList(context.Context, *List) (*Null, error) // SetListItem sets a single item in a list by index. SetListItem(context.Context, *ListItem) (*Null, error) // ListLength returns the number of items in a list. ListLength(context.Context, *Key) (*IntValue, error) // ListLimit sets the maximum length of a list, removing items from the top once limit is reached. ListLimit(context.Context, *ListItem) (*Null, error) // ListInsert inserts a new item at the given index in the list. ListInsert(context.Context, *ListItem) (*Null, error) // ListAppend inserts a new item at the end of the list. ListAppend(context.Context, *ListItem) (*Null, error) // ListPopLeft returns and removes the first item in a list. ListPopLeft(context.Context, *Key) (*ByteValue, error) // ListPopRight returns and removes the last item in a list. ListPopRight(context.Context, *Key) (*ByteValue, error) // ListHas determines if a list contains an item, returns index or -1 if not found. ListHas(context.Context, *ListItem) (*IntValue, error) // ListDelete removes an item from a list by index. ListDelete(context.Context, *ListItem) (*Null, error) // ListDeleteItem removes the first occurrence of value from a list, returns index of removed item or -1 for not found. ListDeleteItem(context.Context, *ListItem) (*IntValue, error) // -- hash functions // GetHash gets a hash from the cache. GetHash(context.Context, *Key) (*Hash, error) // GetHashField gets a single value in a hash. GetHashField(context.Context, *HashField) (*ByteValue, error) // GetHashFields gets multiple hash values. GetHashFields(context.Context, *HashFieldSet) (*Hash, error) // HashHas determines if a hash has a given field. HashHas(context.Context, *HashField) (*Bool, error) // HashLength returns the number of fields in a hash. HashLength(context.Context, *Key) (*IntValue, error) // HashFields gets a list of the fields in a hash. HashFields(context.Context, *Key) (*KeysList, error) // HashValues gets a list of the values in a hash. HashValues(context.Context, *Key) (*List, error) // SetHash sets the value of a hash. SetHash(context.Context, *Hash) (*Null, error) // SetHashField sets a single value in a hash. SetHashField(context.Context, *HashField) (*Null, error) // SetHashFields sets multiple values in a hash. SetHashFields(context.Context, *Hash) (*Null, error) // DelHashField deletes a field from a hash. DelHashField(context.Context, *HashField) (*Null, error) // -- push functions // Watch for changes to a key. Watch(Mydis_WatchServer) error // -- auth passthrough functions // AuthEnable enables authentication. AuthEnable(context.Context, *AuthEnableRequest) (*AuthEnableResponse, error) // AuthDisable disables authentication. AuthDisable(context.Context, *AuthDisableRequest) (*AuthDisableResponse, error) // Authenticate processes an authenticate request. Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) // UserAdd adds a new user. UserAdd(context.Context, *AuthUserAddRequest) (*AuthUserAddResponse, error) // UserGet gets detailed user information. UserGet(context.Context, *AuthUserGetRequest) (*AuthUserGetResponse, error) // UserList gets a list of all users. UserList(context.Context, *AuthUserListRequest) (*AuthUserListResponse, error) // UserDelete deletes a specified user. UserDelete(context.Context, *AuthUserDeleteRequest) (*AuthUserDeleteResponse, error) // UserChangePassword changes the password of a specified user. UserChangePassword(context.Context, *AuthUserChangePasswordRequest) (*AuthUserChangePasswordResponse, error) // UserGrantRole grants a role to a specified user. UserGrantRole(context.Context, *AuthUserGrantRoleRequest) (*AuthUserGrantRoleResponse, error) // UserRevokeRole revokes a role of specified user. UserRevokeRole(context.Context, *AuthUserRevokeRoleRequest) (*AuthUserRevokeRoleResponse, error) // RoleAdd adds a new role. RoleAdd(context.Context, *AuthRoleAddRequest) (*AuthRoleAddResponse, error) // RoleGet gets detailed role information. RoleGet(context.Context, *AuthRoleGetRequest) (*AuthRoleGetResponse, error) // RoleList gets lists of all roles. RoleList(context.Context, *AuthRoleListRequest) (*AuthRoleListResponse, error) // RoleDelete deletes a specified role. RoleDelete(context.Context, *AuthRoleDeleteRequest) (*AuthRoleDeleteResponse, error) // RoleGrantPermission grants a permission of a specified key or range to a specified role. RoleGrantPermission(context.Context, *AuthRoleGrantPermissionRequest) (*AuthRoleGrantPermissionResponse, error) // RoleRevokePermission revokes a key or range permission of a specified role. RoleRevokePermission(context.Context, *AuthRoleRevokePermissionRequest) (*AuthRoleRevokePermissionResponse, error) }
type Mydis_WatchClient ¶
type Mydis_WatchClient interface { Send(*WatchRequest) error Recv() (*Event, error) grpc.ClientStream }
type Mydis_WatchServer ¶
type Mydis_WatchServer interface { Send(*Event) error Recv() (*WatchRequest, error) grpc.ServerStream }
type Null ¶
type Null struct { }
Null object.
func (*Null) Descriptor ¶
func (*Null) ProtoMessage ¶
func (*Null) ProtoMessage()
type Permission ¶
type Permission struct { PermType Permission_Type `protobuf:"varint,1,opt,name=permType,enum=pb.Permission_Type" json:"permType,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` }
-- Etcd auth passthrough messages Permission is a single entity
func (*Permission) Descriptor ¶
func (*Permission) Descriptor() ([]byte, []int)
func (*Permission) GetKey ¶
func (m *Permission) GetKey() []byte
func (*Permission) GetPermType ¶
func (m *Permission) GetPermType() Permission_Type
func (*Permission) GetRangeEnd ¶
func (m *Permission) GetRangeEnd() []byte
func (*Permission) ProtoMessage ¶
func (*Permission) ProtoMessage()
func (*Permission) Reset ¶
func (m *Permission) Reset()
func (*Permission) String ¶
func (m *Permission) String() string
type Permission_Type ¶
type Permission_Type int32
const ( Permission_READ Permission_Type = 0 Permission_WRITE Permission_Type = 1 Permission_READWRITE Permission_Type = 2 )
func (Permission_Type) EnumDescriptor ¶
func (Permission_Type) EnumDescriptor() ([]byte, []int)
func (Permission_Type) String ¶
func (x Permission_Type) String() string
type ResponseHeader ¶
type ResponseHeader struct { // cluster_id is the ID of the cluster which sent the response. ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId" json:"cluster_id,omitempty"` // member_id is the ID of the member which sent the response. MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId" json:"member_id,omitempty"` // revision is the key-value store revision when the request was applied. Revision int64 `protobuf:"varint,3,opt,name=revision" json:"revision,omitempty"` // raft_term is the raft term when the request was applied. RaftTerm uint64 `protobuf:"varint,4,opt,name=raft_term,json=raftTerm" json:"raft_term,omitempty"` }
func (*ResponseHeader) Descriptor ¶
func (*ResponseHeader) Descriptor() ([]byte, []int)
func (*ResponseHeader) GetClusterId ¶
func (m *ResponseHeader) GetClusterId() uint64
func (*ResponseHeader) GetMemberId ¶
func (m *ResponseHeader) GetMemberId() uint64
func (*ResponseHeader) GetRaftTerm ¶
func (m *ResponseHeader) GetRaftTerm() uint64
func (*ResponseHeader) GetRevision ¶
func (m *ResponseHeader) GetRevision() int64
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶
func (m *ResponseHeader) Reset()
func (*ResponseHeader) String ¶
func (m *ResponseHeader) String() string
type StringHash ¶
type StringHash struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value map[string]string `` /* 130-byte string literal not displayed */ }
StringHash object.
func (*StringHash) Descriptor ¶
func (*StringHash) Descriptor() ([]byte, []int)
func (*StringHash) GetKey ¶
func (m *StringHash) GetKey() string
func (*StringHash) GetValue ¶
func (m *StringHash) GetValue() map[string]string
func (*StringHash) ProtoMessage ¶
func (*StringHash) ProtoMessage()
func (*StringHash) Reset ¶
func (m *StringHash) Reset()
func (*StringHash) String ¶
func (m *StringHash) String() string
type WatchRequest ¶
type WatchRequest struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Prefix bool `protobuf:"varint,2,opt,name=prefix" json:"prefix,omitempty"` Rev int64 `protobuf:"varint,3,opt,name=rev" json:"rev,omitempty"` Id int64 `protobuf:"varint,4,opt,name=id" json:"id,omitempty"` Cancel bool `protobuf:"varint,5,opt,name=cancel" json:"cancel,omitempty"` }
WatchRequest object.
func (*WatchRequest) Descriptor ¶
func (*WatchRequest) Descriptor() ([]byte, []int)
func (*WatchRequest) GetCancel ¶
func (m *WatchRequest) GetCancel() bool
func (*WatchRequest) GetId ¶
func (m *WatchRequest) GetId() int64
func (*WatchRequest) GetKey ¶
func (m *WatchRequest) GetKey() string
func (*WatchRequest) GetPrefix ¶
func (m *WatchRequest) GetPrefix() bool
func (*WatchRequest) GetRev ¶
func (m *WatchRequest) GetRev() int64
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) Reset ¶
func (m *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (m *WatchRequest) String() string