mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-12 21:35:40 +08:00
organize essential APIs into platform, workflow and pkg folders (#337)
Add more logic to the way code is organized. /pkg -- library code not directly connected to micromdm /mdm -- packages meant for the services devices interract with. The MDM protocol. /dep -- DEP API and related packages. /platform -- Core APIs the server provides. Commands API, Devices API, queue, pubsub etc. /workflow -- Packages/API that build on top of platform. Today that's the webhook package. Depending on what ends up here, the workflow folder might become its own repository.
This commit is contained in:
3
platform/user/internal/userproto/user.go
Normal file
3
platform/user/internal/userproto/user.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package userproto
|
||||
|
||||
//go:generate protoc --go_out=. user.proto
|
||||
123
platform/user/internal/userproto/user.pb.go
Normal file
123
platform/user/internal/userproto/user.pb.go
Normal file
@@ -0,0 +1,123 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: user.proto
|
||||
|
||||
/*
|
||||
Package userproto is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
user.proto
|
||||
|
||||
It has these top-level messages:
|
||||
User
|
||||
*/
|
||||
package userproto
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import 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.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type User struct {
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
|
||||
Udid string `protobuf:"bytes,2,opt,name=udid" json:"udid,omitempty"`
|
||||
UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId" json:"user_id,omitempty"`
|
||||
UserShortname string `protobuf:"bytes,4,opt,name=user_shortname,json=userShortname" json:"user_shortname,omitempty"`
|
||||
UserLongname string `protobuf:"bytes,5,opt,name=user_longname,json=userLongname" json:"user_longname,omitempty"`
|
||||
AuthToken string `protobuf:"bytes,6,opt,name=auth_token,json=authToken" json:"auth_token,omitempty"`
|
||||
PasswordHash []byte `protobuf:"bytes,7,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
|
||||
Hidden bool `protobuf:"varint,8,opt,name=hidden" json:"hidden,omitempty"`
|
||||
}
|
||||
|
||||
func (m *User) Reset() { *m = User{} }
|
||||
func (m *User) String() string { return proto.CompactTextString(m) }
|
||||
func (*User) ProtoMessage() {}
|
||||
func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
|
||||
func (m *User) GetUuid() string {
|
||||
if m != nil {
|
||||
return m.Uuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetUdid() string {
|
||||
if m != nil {
|
||||
return m.Udid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetUserId() string {
|
||||
if m != nil {
|
||||
return m.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetUserShortname() string {
|
||||
if m != nil {
|
||||
return m.UserShortname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetUserLongname() string {
|
||||
if m != nil {
|
||||
return m.UserLongname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetAuthToken() string {
|
||||
if m != nil {
|
||||
return m.AuthToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *User) GetPasswordHash() []byte {
|
||||
if m != nil {
|
||||
return m.PasswordHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *User) GetHidden() bool {
|
||||
if m != nil {
|
||||
return m.Hidden
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*User)(nil), "userproto.User")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("user.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 206 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0xcf, 0xbf, 0x4a, 0x04, 0x31,
|
||||
0x10, 0x06, 0x70, 0xa2, 0x6b, 0xee, 0x76, 0x58, 0x2d, 0xa6, 0xd0, 0x34, 0xc2, 0xa2, 0x08, 0x5b,
|
||||
0xd9, 0xf8, 0x12, 0x0a, 0x56, 0xab, 0xd6, 0x21, 0x32, 0xc1, 0x04, 0x35, 0x39, 0xf2, 0x07, 0x1f,
|
||||
0xdb, 0x57, 0x38, 0x66, 0xd8, 0xeb, 0xbe, 0xf9, 0xcd, 0x97, 0xc0, 0x00, 0xf4, 0xea, 0xcb, 0xe3,
|
||||
0xa1, 0xe4, 0x96, 0x71, 0xe4, 0x2c, 0xf1, 0xee, 0x5f, 0xc1, 0xf0, 0x51, 0x7d, 0x41, 0x84, 0xa1,
|
||||
0xf7, 0x48, 0x46, 0xcd, 0x6a, 0x19, 0x57, 0xc9, 0x62, 0x14, 0xc9, 0x9c, 0x6d, 0x46, 0x91, 0xf0,
|
||||
0x06, 0x76, 0xfc, 0xda, 0x46, 0x32, 0xe7, 0xc2, 0x9a, 0xc7, 0x17, 0xc2, 0x07, 0xb8, 0x92, 0x45,
|
||||
0x0d, 0xb9, 0xb4, 0xe4, 0x7e, 0xbd, 0x19, 0x64, 0x7f, 0xc9, 0xfa, 0x76, 0x42, 0xbc, 0x07, 0x01,
|
||||
0xfb, 0x93, 0xd3, 0x97, 0xb4, 0x2e, 0xa4, 0x35, 0x31, 0xbe, 0x6e, 0x86, 0xb7, 0x00, 0xae, 0xb7,
|
||||
0x60, 0x5b, 0xfe, 0xf6, 0xc9, 0x68, 0x69, 0x8c, 0x2c, 0xef, 0x0c, 0xfc, 0xc7, 0xc1, 0xd5, 0xfa,
|
||||
0x97, 0x0b, 0xd9, 0xe0, 0x6a, 0x30, 0xbb, 0x59, 0x2d, 0xd3, 0x3a, 0x9d, 0xf0, 0xd9, 0xd5, 0x80,
|
||||
0xd7, 0xa0, 0x43, 0x24, 0xf2, 0xc9, 0xec, 0x67, 0xb5, 0xec, 0xd7, 0x6d, 0xfa, 0xd4, 0x72, 0xf8,
|
||||
0xd3, 0x31, 0x00, 0x00, 0xff, 0xff, 0x35, 0xa8, 0xcb, 0x32, 0x11, 0x01, 0x00, 0x00,
|
||||
}
|
||||
16
platform/user/internal/userproto/user.proto
Normal file
16
platform/user/internal/userproto/user.proto
Normal file
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package userproto;
|
||||
|
||||
|
||||
message User {
|
||||
string uuid = 1;
|
||||
string udid = 2;
|
||||
string user_id = 3;
|
||||
string user_shortname = 4;
|
||||
string user_longname = 5;
|
||||
string auth_token = 6;
|
||||
bytes password_hash = 7;
|
||||
bool hidden = 8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user