2 Star 0 Fork 0

成都极趣科技/chirpstack-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
user.pb.go 42.06 KB
一键复制 编辑 原始数据 按行查看 历史
Arya11111 提交于 2024-06-04 17:38 +08:00 . codec
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: as/external/api/user.proto
package api
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type DefPasswordResponse struct {
// Types that are valid to be assigned to Status:
//
// *DefPasswordResponse_Password
// *DefPasswordResponse_Default
Status isDefPasswordResponse_Status `protobuf_oneof:"status"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DefPasswordResponse) Reset() { *m = DefPasswordResponse{} }
func (m *DefPasswordResponse) String() string { return proto.CompactTextString(m) }
func (*DefPasswordResponse) ProtoMessage() {}
func (*DefPasswordResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{0}
}
func (m *DefPasswordResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DefPasswordResponse.Unmarshal(m, b)
}
func (m *DefPasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DefPasswordResponse.Marshal(b, m, deterministic)
}
func (m *DefPasswordResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DefPasswordResponse.Merge(m, src)
}
func (m *DefPasswordResponse) XXX_Size() int {
return xxx_messageInfo_DefPasswordResponse.Size(m)
}
func (m *DefPasswordResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DefPasswordResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DefPasswordResponse proto.InternalMessageInfo
type isDefPasswordResponse_Status interface {
isDefPasswordResponse_Status()
}
type DefPasswordResponse_Password struct {
Password string `protobuf:"bytes,1,opt,name=password,proto3,oneof"`
}
type DefPasswordResponse_Default struct {
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*DefPasswordResponse_Password) isDefPasswordResponse_Status() {}
func (*DefPasswordResponse_Default) isDefPasswordResponse_Status() {}
func (m *DefPasswordResponse) GetStatus() isDefPasswordResponse_Status {
if m != nil {
return m.Status
}
return nil
}
func (m *DefPasswordResponse) GetPassword() string {
if x, ok := m.GetStatus().(*DefPasswordResponse_Password); ok {
return x.Password
}
return ""
}
func (m *DefPasswordResponse) GetDefault() bool {
if x, ok := m.GetStatus().(*DefPasswordResponse_Default); ok {
return x.Default
}
return false
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*DefPasswordResponse) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*DefPasswordResponse_Password)(nil),
(*DefPasswordResponse_Default)(nil),
}
}
type User struct {
// User ID.
// Will be set automatically on create.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The session timeout, in minutes.
SessionTtl int32 `protobuf:"varint,3,opt,name=session_ttl,json=sessionTTL,proto3" json:"session_ttl,omitempty"`
// Set to true to make the user a global administrator.
IsAdmin bool `protobuf:"varint,4,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
// Set to false to disable the user.
IsActive bool `protobuf:"varint,5,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
// E-mail of the user.
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
// Optional note to store with the user.
Note string `protobuf:"bytes,7,opt,name=note,proto3" json:"note,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{1}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
}
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_User.Marshal(b, m, deterministic)
}
func (m *User) XXX_Merge(src proto.Message) {
xxx_messageInfo_User.Merge(m, src)
}
func (m *User) XXX_Size() int {
return xxx_messageInfo_User.Size(m)
}
func (m *User) XXX_DiscardUnknown() {
xxx_messageInfo_User.DiscardUnknown(m)
}
var xxx_messageInfo_User proto.InternalMessageInfo
func (m *User) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
func (m *User) GetSessionTtl() int32 {
if m != nil {
return m.SessionTtl
}
return 0
}
func (m *User) GetIsAdmin() bool {
if m != nil {
return m.IsAdmin
}
return false
}
func (m *User) GetIsActive() bool {
if m != nil {
return m.IsActive
}
return false
}
func (m *User) GetEmail() string {
if m != nil {
return m.Email
}
return ""
}
func (m *User) GetNote() string {
if m != nil {
return m.Note
}
return ""
}
type UserListItem struct {
// User ID.
// Will be set automatically on create.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// Email of the user.
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// The session timeout, in minutes.
SessionTtl int32 `protobuf:"varint,3,opt,name=session_ttl,json=sessionTTL,proto3" json:"session_ttl,omitempty"`
// Set to true to make the user a global administrator.
IsAdmin bool `protobuf:"varint,4,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
// Set to false to disable the user.
IsActive bool `protobuf:"varint,5,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
// Created at timestamp.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Last update timestamp.
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UserListItem) Reset() { *m = UserListItem{} }
func (m *UserListItem) String() string { return proto.CompactTextString(m) }
func (*UserListItem) ProtoMessage() {}
func (*UserListItem) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{2}
}
func (m *UserListItem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserListItem.Unmarshal(m, b)
}
func (m *UserListItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UserListItem.Marshal(b, m, deterministic)
}
func (m *UserListItem) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserListItem.Merge(m, src)
}
func (m *UserListItem) XXX_Size() int {
return xxx_messageInfo_UserListItem.Size(m)
}
func (m *UserListItem) XXX_DiscardUnknown() {
xxx_messageInfo_UserListItem.DiscardUnknown(m)
}
var xxx_messageInfo_UserListItem proto.InternalMessageInfo
func (m *UserListItem) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
func (m *UserListItem) GetEmail() string {
if m != nil {
return m.Email
}
return ""
}
func (m *UserListItem) GetSessionTtl() int32 {
if m != nil {
return m.SessionTtl
}
return 0
}
func (m *UserListItem) GetIsAdmin() bool {
if m != nil {
return m.IsAdmin
}
return false
}
func (m *UserListItem) GetIsActive() bool {
if m != nil {
return m.IsActive
}
return false
}
func (m *UserListItem) GetCreatedAt() *timestamppb.Timestamp {
if m != nil {
return m.CreatedAt
}
return nil
}
func (m *UserListItem) GetUpdatedAt() *timestamppb.Timestamp {
if m != nil {
return m.UpdatedAt
}
return nil
}
type UserOrganization struct {
// Organization ID.
OrganizationId int64 `protobuf:"varint,1,opt,name=organization_id,json=organizationID,proto3" json:"organization_id,omitempty"`
// User is admin within the context of the organization.
// There is no need to set the is_device_admin and is_gateway_admin flags.
IsAdmin bool `protobuf:"varint,2,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
// User is able to modify device related resources (applications,
// device-profiles, devices, multicast-groups).
IsDeviceAdmin bool `protobuf:"varint,3,opt,name=is_device_admin,json=isDeviceAdmin,proto3" json:"is_device_admin,omitempty"`
// User is able to modify gateways.
IsGatewayAdmin bool `protobuf:"varint,4,opt,name=is_gateway_admin,json=isGatewayAdmin,proto3" json:"is_gateway_admin,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UserOrganization) Reset() { *m = UserOrganization{} }
func (m *UserOrganization) String() string { return proto.CompactTextString(m) }
func (*UserOrganization) ProtoMessage() {}
func (*UserOrganization) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{3}
}
func (m *UserOrganization) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserOrganization.Unmarshal(m, b)
}
func (m *UserOrganization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UserOrganization.Marshal(b, m, deterministic)
}
func (m *UserOrganization) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserOrganization.Merge(m, src)
}
func (m *UserOrganization) XXX_Size() int {
return xxx_messageInfo_UserOrganization.Size(m)
}
func (m *UserOrganization) XXX_DiscardUnknown() {
xxx_messageInfo_UserOrganization.DiscardUnknown(m)
}
var xxx_messageInfo_UserOrganization proto.InternalMessageInfo
func (m *UserOrganization) GetOrganizationId() int64 {
if m != nil {
return m.OrganizationId
}
return 0
}
func (m *UserOrganization) GetIsAdmin() bool {
if m != nil {
return m.IsAdmin
}
return false
}
func (m *UserOrganization) GetIsDeviceAdmin() bool {
if m != nil {
return m.IsDeviceAdmin
}
return false
}
func (m *UserOrganization) GetIsGatewayAdmin() bool {
if m != nil {
return m.IsGatewayAdmin
}
return false
}
type CreateUserRequest struct {
// User object to create.
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// Password of the user.
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// Add the user to the following organizations.
Organizations []*UserOrganization `protobuf:"bytes,3,rep,name=organizations,proto3" json:"organizations,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateUserRequest) Reset() { *m = CreateUserRequest{} }
func (m *CreateUserRequest) String() string { return proto.CompactTextString(m) }
func (*CreateUserRequest) ProtoMessage() {}
func (*CreateUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{4}
}
func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateUserRequest.Unmarshal(m, b)
}
func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateUserRequest.Marshal(b, m, deterministic)
}
func (m *CreateUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateUserRequest.Merge(m, src)
}
func (m *CreateUserRequest) XXX_Size() int {
return xxx_messageInfo_CreateUserRequest.Size(m)
}
func (m *CreateUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateUserRequest proto.InternalMessageInfo
func (m *CreateUserRequest) GetUser() *User {
if m != nil {
return m.User
}
return nil
}
func (m *CreateUserRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
func (m *CreateUserRequest) GetOrganizations() []*UserOrganization {
if m != nil {
return m.Organizations
}
return nil
}
type CreateUserResponse struct {
// User ID.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateUserResponse) Reset() { *m = CreateUserResponse{} }
func (m *CreateUserResponse) String() string { return proto.CompactTextString(m) }
func (*CreateUserResponse) ProtoMessage() {}
func (*CreateUserResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{5}
}
func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateUserResponse.Unmarshal(m, b)
}
func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateUserResponse.Marshal(b, m, deterministic)
}
func (m *CreateUserResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateUserResponse.Merge(m, src)
}
func (m *CreateUserResponse) XXX_Size() int {
return xxx_messageInfo_CreateUserResponse.Size(m)
}
func (m *CreateUserResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CreateUserResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CreateUserResponse proto.InternalMessageInfo
func (m *CreateUserResponse) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
type GetUserRequest struct {
// User ID.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserRequest) Reset() { *m = GetUserRequest{} }
func (m *GetUserRequest) String() string { return proto.CompactTextString(m) }
func (*GetUserRequest) ProtoMessage() {}
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{6}
}
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserRequest.Unmarshal(m, b)
}
func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserRequest.Marshal(b, m, deterministic)
}
func (m *GetUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserRequest.Merge(m, src)
}
func (m *GetUserRequest) XXX_Size() int {
return xxx_messageInfo_GetUserRequest.Size(m)
}
func (m *GetUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserRequest proto.InternalMessageInfo
func (m *GetUserRequest) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
type GetUserResponse struct {
// User object.
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// Created at timestamp.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Last update timestamp.
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserResponse) Reset() { *m = GetUserResponse{} }
func (m *GetUserResponse) String() string { return proto.CompactTextString(m) }
func (*GetUserResponse) ProtoMessage() {}
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{7}
}
func (m *GetUserResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserResponse.Unmarshal(m, b)
}
func (m *GetUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserResponse.Marshal(b, m, deterministic)
}
func (m *GetUserResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserResponse.Merge(m, src)
}
func (m *GetUserResponse) XXX_Size() int {
return xxx_messageInfo_GetUserResponse.Size(m)
}
func (m *GetUserResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserResponse proto.InternalMessageInfo
func (m *GetUserResponse) GetUser() *User {
if m != nil {
return m.User
}
return nil
}
func (m *GetUserResponse) GetCreatedAt() *timestamppb.Timestamp {
if m != nil {
return m.CreatedAt
}
return nil
}
func (m *GetUserResponse) GetUpdatedAt() *timestamppb.Timestamp {
if m != nil {
return m.UpdatedAt
}
return nil
}
type UpdateUserRequest struct {
// User object to update.
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateUserRequest) Reset() { *m = UpdateUserRequest{} }
func (m *UpdateUserRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateUserRequest) ProtoMessage() {}
func (*UpdateUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{8}
}
func (m *UpdateUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserRequest.Unmarshal(m, b)
}
func (m *UpdateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateUserRequest.Marshal(b, m, deterministic)
}
func (m *UpdateUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateUserRequest.Merge(m, src)
}
func (m *UpdateUserRequest) XXX_Size() int {
return xxx_messageInfo_UpdateUserRequest.Size(m)
}
func (m *UpdateUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateUserRequest proto.InternalMessageInfo
func (m *UpdateUserRequest) GetUser() *User {
if m != nil {
return m.User
}
return nil
}
type DeleteUserRequest struct {
// User ID.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteUserRequest) Reset() { *m = DeleteUserRequest{} }
func (m *DeleteUserRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteUserRequest) ProtoMessage() {}
func (*DeleteUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{9}
}
func (m *DeleteUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUserRequest.Unmarshal(m, b)
}
func (m *DeleteUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteUserRequest.Marshal(b, m, deterministic)
}
func (m *DeleteUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteUserRequest.Merge(m, src)
}
func (m *DeleteUserRequest) XXX_Size() int {
return xxx_messageInfo_DeleteUserRequest.Size(m)
}
func (m *DeleteUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteUserRequest proto.InternalMessageInfo
func (m *DeleteUserRequest) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
type ListUserRequest struct {
// Max number of user to return in the result-set.
Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
// Offset in the result-set (for pagination).
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListUserRequest) Reset() { *m = ListUserRequest{} }
func (m *ListUserRequest) String() string { return proto.CompactTextString(m) }
func (*ListUserRequest) ProtoMessage() {}
func (*ListUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{10}
}
func (m *ListUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListUserRequest.Unmarshal(m, b)
}
func (m *ListUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListUserRequest.Marshal(b, m, deterministic)
}
func (m *ListUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListUserRequest.Merge(m, src)
}
func (m *ListUserRequest) XXX_Size() int {
return xxx_messageInfo_ListUserRequest.Size(m)
}
func (m *ListUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListUserRequest proto.InternalMessageInfo
func (m *ListUserRequest) GetLimit() int64 {
if m != nil {
return m.Limit
}
return 0
}
func (m *ListUserRequest) GetOffset() int64 {
if m != nil {
return m.Offset
}
return 0
}
type ListUserResponse struct {
// Total number of users.
TotalCount int64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
// Result-set.
Result []*UserListItem `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListUserResponse) Reset() { *m = ListUserResponse{} }
func (m *ListUserResponse) String() string { return proto.CompactTextString(m) }
func (*ListUserResponse) ProtoMessage() {}
func (*ListUserResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{11}
}
func (m *ListUserResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListUserResponse.Unmarshal(m, b)
}
func (m *ListUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListUserResponse.Marshal(b, m, deterministic)
}
func (m *ListUserResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListUserResponse.Merge(m, src)
}
func (m *ListUserResponse) XXX_Size() int {
return xxx_messageInfo_ListUserResponse.Size(m)
}
func (m *ListUserResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListUserResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListUserResponse proto.InternalMessageInfo
func (m *ListUserResponse) GetTotalCount() int64 {
if m != nil {
return m.TotalCount
}
return 0
}
func (m *ListUserResponse) GetResult() []*UserListItem {
if m != nil {
return m.Result
}
return nil
}
type UpdateUserPasswordRequest struct {
// User ID.
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Old string `protobuf:"bytes,3,opt,name=old,proto3" json:"old,omitempty"`
// New pasword.
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateUserPasswordRequest) Reset() { *m = UpdateUserPasswordRequest{} }
func (m *UpdateUserPasswordRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateUserPasswordRequest) ProtoMessage() {}
func (*UpdateUserPasswordRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_213a97a4df8a40e1, []int{12}
}
func (m *UpdateUserPasswordRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserPasswordRequest.Unmarshal(m, b)
}
func (m *UpdateUserPasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateUserPasswordRequest.Marshal(b, m, deterministic)
}
func (m *UpdateUserPasswordRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateUserPasswordRequest.Merge(m, src)
}
func (m *UpdateUserPasswordRequest) XXX_Size() int {
return xxx_messageInfo_UpdateUserPasswordRequest.Size(m)
}
func (m *UpdateUserPasswordRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateUserPasswordRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateUserPasswordRequest proto.InternalMessageInfo
func (m *UpdateUserPasswordRequest) GetUserId() int64 {
if m != nil {
return m.UserId
}
return 0
}
func (m *UpdateUserPasswordRequest) GetOld() string {
if m != nil {
return m.Old
}
return ""
}
func (m *UpdateUserPasswordRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
func init() {
proto.RegisterType((*DefPasswordResponse)(nil), "api.DefPasswordResponse")
proto.RegisterType((*User)(nil), "api.User")
proto.RegisterType((*UserListItem)(nil), "api.UserListItem")
proto.RegisterType((*UserOrganization)(nil), "api.UserOrganization")
proto.RegisterType((*CreateUserRequest)(nil), "api.CreateUserRequest")
proto.RegisterType((*CreateUserResponse)(nil), "api.CreateUserResponse")
proto.RegisterType((*GetUserRequest)(nil), "api.GetUserRequest")
proto.RegisterType((*GetUserResponse)(nil), "api.GetUserResponse")
proto.RegisterType((*UpdateUserRequest)(nil), "api.UpdateUserRequest")
proto.RegisterType((*DeleteUserRequest)(nil), "api.DeleteUserRequest")
proto.RegisterType((*ListUserRequest)(nil), "api.ListUserRequest")
proto.RegisterType((*ListUserResponse)(nil), "api.ListUserResponse")
proto.RegisterType((*UpdateUserPasswordRequest)(nil), "api.UpdateUserPasswordRequest")
}
func init() {
proto.RegisterFile("as/external/api/user.proto", fileDescriptor_213a97a4df8a40e1)
}
var fileDescriptor_213a97a4df8a40e1 = []byte{
// 926 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x8e, 0xdb, 0x44,
0x14, 0xae, 0xe3, 0xac, 0x37, 0x39, 0x69, 0xf3, 0x33, 0xcd, 0xee, 0x7a, 0xdd, 0x96, 0x0d, 0x06,
0x41, 0xa8, 0x84, 0x2d, 0x05, 0x71, 0x01, 0x5c, 0xa0, 0x6d, 0x17, 0x6d, 0x57, 0xaa, 0x44, 0x31,
0xdb, 0x8b, 0x56, 0x88, 0x68, 0x36, 0x9e, 0x84, 0x11, 0x8e, 0xc7, 0x78, 0x26, 0x2d, 0x05, 0xed,
0x0d, 0x5c, 0x72, 0xc9, 0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f, 0xa0, 0xd7, 0x2a, 0xaa, 0x2b, 0xe6, 0xb8, 0x72, 0x89,
0xb1, 0x5a, 0xc2, 0xf7, 0xee, 0x55, 0xd5, 0x4f, 0x69, 0x7c, 0x19, 0x16, 0xa6, 0x90, 0x65, 0x7c,
0xa1, 0x2e, 0x90, 0xd2, 0xfb, 0x8c, 0xae, 0xe0, 0xf4, 0x5c, 0x53, 0x66, 0xed, 0x25, 0xf7, 0x5d,
0xb5, 0x1a, 0x42, 0x7d, 0xb5, 0x5a, 0x4c, 0xe6, 0xc5, 0x02, 0x0f, 0x9e, 0xc3, 0xeb, 0x94, 0x05,
0xb3, 0xaf, 0x68, 0x9e, 0x71, 0x81, 0x67, 0x5f, 0x2b, 0x0a, 0xcc, 0x83, 0xe2, 0x5f, 0x44, 0xc6,
0xcf, 0xdf, 0x5f, 0x50, 0x41, 0x48, 0x30, 0x63, 0xcb, 0x30, 0x9e, 0xe7, 0xec, 0x82, 0x89, 0x59,
0x1c, 0x6e, 0xe6, 0xbc, 0x2b, 0x49, 0x17, 0x2c, 0xac, 0xfc, 0xc2, 0x5c, 0x38, 0x4a, 0xdf, 0x7b,
0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xac, 0xb2, 0xf0, 0xa4, 0xdc, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// UserServiceClient is the client API for UserService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UserServiceClient interface {
// Get user list.
List(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (*ListUserResponse, error)
// Get data for a particular user.
Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
// Create a new user.
Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
// Update an existing user.
Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete a user.
Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// UpdatePassword updates a password.
UpdatePassword(ctx context.Context, in *UpdateUserPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetDefPassword(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DefPasswordResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) List(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (*ListUserResponse, error) {
out := new(ListUserResponse)
err := c.cc.Invoke(ctx, "/api.UserService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, "/api.UserService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) {
out := new(CreateUserResponse)
err := c.cc.Invoke(ctx, "/api.UserService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) UpdatePassword(ctx context.Context, in *UpdateUserPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/UpdatePassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) GetDefPassword(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DefPasswordResponse, error) {
out := new(DefPasswordResponse)
err := c.cc.Invoke(ctx, "/api.UserService/GetDefPassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
type UserServiceServer interface {
// Get user list.
List(context.Context, *ListUserRequest) (*ListUserResponse, error)
// Get data for a particular user.
Get(context.Context, *GetUserRequest) (*GetUserResponse, error)
// Create a new user.
Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
// Update an existing user.
Update(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
// Delete a user.
Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
// UpdatePassword updates a password.
UpdatePassword(context.Context, *UpdateUserPasswordRequest) (*emptypb.Empty, error)
GetDefPassword(context.Context, *emptypb.Empty) (*DefPasswordResponse, error)
}
// UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (*UnimplementedUserServiceServer) List(ctx context.Context, req *ListUserRequest) (*ListUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedUserServiceServer) Get(ctx context.Context, req *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedUserServiceServer) Create(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedUserServiceServer) Update(ctx context.Context, req *UpdateUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedUserServiceServer) Delete(ctx context.Context, req *DeleteUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (*UnimplementedUserServiceServer) UpdatePassword(ctx context.Context, req *UpdateUserPasswordRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePassword not implemented")
}
func (*UnimplementedUserServiceServer) GetDefPassword(ctx context.Context, req *emptypb.Empty) (*DefPasswordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDefPassword not implemented")
}
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
s.RegisterService(&_UserService_serviceDesc, srv)
}
func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).List(ctx, req.(*ListUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Get(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Create(ctx, req.(*CreateUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Update(ctx, req.(*UpdateUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Delete(ctx, req.(*DeleteUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserPasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).UpdatePassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/UpdatePassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).UpdatePassword(ctx, req.(*UpdateUserPasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_GetDefPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetDefPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/GetDefPassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetDefPassword(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _UserService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _UserService_List_Handler,
},
{
MethodName: "Get",
Handler: _UserService_Get_Handler,
},
{
MethodName: "Create",
Handler: _UserService_Create_Handler,
},
{
MethodName: "Update",
Handler: _UserService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _UserService_Delete_Handler,
},
{
MethodName: "UpdatePassword",
Handler: _UserService_UpdatePassword_Handler,
},
{
MethodName: "GetDefPassword",
Handler: _UserService_GetDefPassword_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "as/external/api/user.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dfrobotcd/chirpstack-api.git
git@gitee.com:dfrobotcd/chirpstack-api.git
dfrobotcd
chirpstack-api
chirpstack-api
d91e8b8d685d

搜索帮助