2016-10-04 05:15:41 +00:00
|
|
|
// Code generated by protoc-gen-go.
|
|
|
|
// source: api/api.proto
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package api is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
api/api.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
Client
|
|
|
|
CreateClientReq
|
|
|
|
CreateClientResp
|
|
|
|
DeleteClientReq
|
|
|
|
DeleteClientResp
|
2016-10-27 23:28:11 +00:00
|
|
|
Password
|
|
|
|
CreatePasswordReq
|
|
|
|
CreatePasswordResp
|
|
|
|
UpdatePasswordReq
|
|
|
|
UpdatePasswordResp
|
|
|
|
DeletePasswordReq
|
|
|
|
DeletePasswordResp
|
2016-11-09 20:33:33 +00:00
|
|
|
VersionReq
|
|
|
|
VersionResp
|
2016-10-04 05:15:41 +00:00
|
|
|
*/
|
|
|
|
package api
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
// Client represents an OAuth2 client.
|
|
|
|
type Client struct {
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Secret string `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty"`
|
|
|
|
RedirectUris []string `protobuf:"bytes,3,rep,name=redirect_uris,json=redirectUris" json:"redirect_uris,omitempty"`
|
|
|
|
TrustedPeers []string `protobuf:"bytes,4,rep,name=trusted_peers,json=trustedPeers" json:"trusted_peers,omitempty"`
|
|
|
|
Public bool `protobuf:"varint,5,opt,name=public" json:"public,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
|
|
|
|
LogoUrl string `protobuf:"bytes,7,opt,name=logo_url,json=logoUrl" json:"logo_url,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Client) Reset() { *m = Client{} }
|
|
|
|
func (m *Client) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Client) ProtoMessage() {}
|
|
|
|
func (*Client) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
|
|
|
|
// CreateClientReq is a request to make a client.
|
|
|
|
type CreateClientReq struct {
|
|
|
|
Client *Client `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateClientReq) Reset() { *m = CreateClientReq{} }
|
|
|
|
func (m *CreateClientReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateClientReq) ProtoMessage() {}
|
|
|
|
func (*CreateClientReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
|
|
|
|
func (m *CreateClientReq) GetClient() *Client {
|
|
|
|
if m != nil {
|
|
|
|
return m.Client
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateClientResp returns the response from creating a client.
|
|
|
|
type CreateClientResp struct {
|
|
|
|
AlreadyExists bool `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists" json:"already_exists,omitempty"`
|
|
|
|
Client *Client `protobuf:"bytes,2,opt,name=client" json:"client,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateClientResp) Reset() { *m = CreateClientResp{} }
|
|
|
|
func (m *CreateClientResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateClientResp) ProtoMessage() {}
|
|
|
|
func (*CreateClientResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
|
|
|
|
func (m *CreateClientResp) GetClient() *Client {
|
|
|
|
if m != nil {
|
|
|
|
return m.Client
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeleteClientReq is a request to delete a client.
|
|
|
|
type DeleteClientReq struct {
|
|
|
|
// The ID of the client.
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeleteClientReq) Reset() { *m = DeleteClientReq{} }
|
|
|
|
func (m *DeleteClientReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DeleteClientReq) ProtoMessage() {}
|
|
|
|
func (*DeleteClientReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
|
|
|
|
|
|
|
// DeleteClientResp determines if the.
|
|
|
|
type DeleteClientResp struct {
|
|
|
|
NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeleteClientResp) Reset() { *m = DeleteClientResp{} }
|
|
|
|
func (m *DeleteClientResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DeleteClientResp) ProtoMessage() {}
|
|
|
|
func (*DeleteClientResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
|
|
|
|
2016-10-27 23:28:11 +00:00
|
|
|
// Password is an email for password mapping managed by the storage.
|
|
|
|
type Password struct {
|
|
|
|
Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
|
|
|
|
// Currently we do not accept plain text passwords. Could be an option in the future.
|
|
|
|
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
|
|
Username string `protobuf:"bytes,3,opt,name=username" json:"username,omitempty"`
|
|
|
|
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId" json:"user_id,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Password) Reset() { *m = Password{} }
|
|
|
|
func (m *Password) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Password) ProtoMessage() {}
|
|
|
|
func (*Password) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
|
|
|
|
|
|
|
// CreatePasswordReq is a request to make a password.
|
|
|
|
type CreatePasswordReq struct {
|
|
|
|
Password *Password `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreatePasswordReq) Reset() { *m = CreatePasswordReq{} }
|
|
|
|
func (m *CreatePasswordReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreatePasswordReq) ProtoMessage() {}
|
|
|
|
func (*CreatePasswordReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
|
|
|
|
|
|
|
func (m *CreatePasswordReq) GetPassword() *Password {
|
|
|
|
if m != nil {
|
|
|
|
return m.Password
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreatePasswordResp returns the response from creating a password.
|
|
|
|
type CreatePasswordResp struct {
|
|
|
|
AlreadyExists bool `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists" json:"already_exists,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreatePasswordResp) Reset() { *m = CreatePasswordResp{} }
|
|
|
|
func (m *CreatePasswordResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreatePasswordResp) ProtoMessage() {}
|
|
|
|
func (*CreatePasswordResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
|
|
|
|
|
|
|
// UpdatePasswordReq is a request to modify an existing password.
|
|
|
|
type UpdatePasswordReq struct {
|
|
|
|
// The email used to lookup the password. This field cannot be modified
|
|
|
|
Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
|
|
|
|
NewHash []byte `protobuf:"bytes,2,opt,name=new_hash,json=newHash,proto3" json:"new_hash,omitempty"`
|
|
|
|
NewUsername string `protobuf:"bytes,3,opt,name=new_username,json=newUsername" json:"new_username,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdatePasswordReq) Reset() { *m = UpdatePasswordReq{} }
|
|
|
|
func (m *UpdatePasswordReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdatePasswordReq) ProtoMessage() {}
|
|
|
|
func (*UpdatePasswordReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
|
|
|
|
|
|
|
// UpdatePasswordResp returns the response from modifying an existing password.
|
|
|
|
type UpdatePasswordResp struct {
|
|
|
|
NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdatePasswordResp) Reset() { *m = UpdatePasswordResp{} }
|
|
|
|
func (m *UpdatePasswordResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdatePasswordResp) ProtoMessage() {}
|
|
|
|
func (*UpdatePasswordResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
|
|
|
|
|
|
|
// DeletePasswordReq is a request to delete a password.
|
|
|
|
type DeletePasswordReq struct {
|
|
|
|
Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeletePasswordReq) Reset() { *m = DeletePasswordReq{} }
|
|
|
|
func (m *DeletePasswordReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DeletePasswordReq) ProtoMessage() {}
|
|
|
|
func (*DeletePasswordReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
|
|
|
|
|
|
|
// DeletePasswordResp returns the response from deleting a password.
|
|
|
|
type DeletePasswordResp struct {
|
|
|
|
NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeletePasswordResp) Reset() { *m = DeletePasswordResp{} }
|
|
|
|
func (m *DeletePasswordResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DeletePasswordResp) ProtoMessage() {}
|
|
|
|
func (*DeletePasswordResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
|
|
|
|
2016-11-09 20:33:33 +00:00
|
|
|
// VersionReq is a request to fetch version info.
|
|
|
|
type VersionReq struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VersionReq) Reset() { *m = VersionReq{} }
|
|
|
|
func (m *VersionReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*VersionReq) ProtoMessage() {}
|
|
|
|
func (*VersionReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
|
|
|
|
|
|
|
|
// VersionResp holds the version info of components.
|
|
|
|
type VersionResp struct {
|
|
|
|
// Semantic version of the server.
|
|
|
|
Server string `protobuf:"bytes,1,opt,name=server" json:"server,omitempty"`
|
|
|
|
// Numeric version of the API. It increases everytime a new call is added to the API.
|
|
|
|
// Clients should use this info to determine if the server supports specific features.
|
|
|
|
Api int32 `protobuf:"varint,2,opt,name=api" json:"api,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VersionResp) Reset() { *m = VersionResp{} }
|
|
|
|
func (m *VersionResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*VersionResp) ProtoMessage() {}
|
|
|
|
func (*VersionResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
|
|
|
|
|
2016-10-04 05:15:41 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Client)(nil), "api.Client")
|
|
|
|
proto.RegisterType((*CreateClientReq)(nil), "api.CreateClientReq")
|
|
|
|
proto.RegisterType((*CreateClientResp)(nil), "api.CreateClientResp")
|
|
|
|
proto.RegisterType((*DeleteClientReq)(nil), "api.DeleteClientReq")
|
|
|
|
proto.RegisterType((*DeleteClientResp)(nil), "api.DeleteClientResp")
|
2016-10-27 23:28:11 +00:00
|
|
|
proto.RegisterType((*Password)(nil), "api.Password")
|
|
|
|
proto.RegisterType((*CreatePasswordReq)(nil), "api.CreatePasswordReq")
|
|
|
|
proto.RegisterType((*CreatePasswordResp)(nil), "api.CreatePasswordResp")
|
|
|
|
proto.RegisterType((*UpdatePasswordReq)(nil), "api.UpdatePasswordReq")
|
|
|
|
proto.RegisterType((*UpdatePasswordResp)(nil), "api.UpdatePasswordResp")
|
|
|
|
proto.RegisterType((*DeletePasswordReq)(nil), "api.DeletePasswordReq")
|
|
|
|
proto.RegisterType((*DeletePasswordResp)(nil), "api.DeletePasswordResp")
|
2016-11-09 20:33:33 +00:00
|
|
|
proto.RegisterType((*VersionReq)(nil), "api.VersionReq")
|
|
|
|
proto.RegisterType((*VersionResp)(nil), "api.VersionResp")
|
2016-10-04 05:15:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// 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.SupportPackageIsVersion3
|
|
|
|
|
|
|
|
// Client API for Dex service
|
|
|
|
|
|
|
|
type DexClient interface {
|
2016-11-09 20:33:33 +00:00
|
|
|
// CreateClient creates a client.
|
2016-10-04 05:15:41 +00:00
|
|
|
CreateClient(ctx context.Context, in *CreateClientReq, opts ...grpc.CallOption) (*CreateClientResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// DeleteClient deletes the provided client.
|
2016-10-04 05:15:41 +00:00
|
|
|
DeleteClient(ctx context.Context, in *DeleteClientReq, opts ...grpc.CallOption) (*DeleteClientResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// CreatePassword creates a password.
|
2016-10-27 23:28:11 +00:00
|
|
|
CreatePassword(ctx context.Context, in *CreatePasswordReq, opts ...grpc.CallOption) (*CreatePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// UpdatePassword modifies existing password.
|
2016-10-27 23:28:11 +00:00
|
|
|
UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// DeletePassword deletes the password.
|
2016-10-27 23:28:11 +00:00
|
|
|
DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*DeletePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// GetVersion returns version information of the server.
|
|
|
|
GetVersion(ctx context.Context, in *VersionReq, opts ...grpc.CallOption) (*VersionResp, error)
|
2016-10-04 05:15:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type dexClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewDexClient(cc *grpc.ClientConn) DexClient {
|
|
|
|
return &dexClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *dexClient) CreateClient(ctx context.Context, in *CreateClientReq, opts ...grpc.CallOption) (*CreateClientResp, error) {
|
|
|
|
out := new(CreateClientResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/CreateClient", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *dexClient) DeleteClient(ctx context.Context, in *DeleteClientReq, opts ...grpc.CallOption) (*DeleteClientResp, error) {
|
|
|
|
out := new(DeleteClientResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/DeleteClient", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2016-10-27 23:28:11 +00:00
|
|
|
func (c *dexClient) CreatePassword(ctx context.Context, in *CreatePasswordReq, opts ...grpc.CallOption) (*CreatePasswordResp, error) {
|
|
|
|
out := new(CreatePasswordResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/CreatePassword", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *dexClient) UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordResp, error) {
|
|
|
|
out := new(UpdatePasswordResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/UpdatePassword", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *dexClient) DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*DeletePasswordResp, error) {
|
|
|
|
out := new(DeletePasswordResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/DeletePassword", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2016-11-09 20:33:33 +00:00
|
|
|
func (c *dexClient) GetVersion(ctx context.Context, in *VersionReq, opts ...grpc.CallOption) (*VersionResp, error) {
|
|
|
|
out := new(VersionResp)
|
|
|
|
err := grpc.Invoke(ctx, "/api.Dex/GetVersion", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2016-10-04 05:15:41 +00:00
|
|
|
// Server API for Dex service
|
|
|
|
|
|
|
|
type DexServer interface {
|
2016-11-09 20:33:33 +00:00
|
|
|
// CreateClient creates a client.
|
2016-10-04 05:15:41 +00:00
|
|
|
CreateClient(context.Context, *CreateClientReq) (*CreateClientResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// DeleteClient deletes the provided client.
|
2016-10-04 05:15:41 +00:00
|
|
|
DeleteClient(context.Context, *DeleteClientReq) (*DeleteClientResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// CreatePassword creates a password.
|
2016-10-27 23:28:11 +00:00
|
|
|
CreatePassword(context.Context, *CreatePasswordReq) (*CreatePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// UpdatePassword modifies existing password.
|
2016-10-27 23:28:11 +00:00
|
|
|
UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// DeletePassword deletes the password.
|
2016-10-27 23:28:11 +00:00
|
|
|
DeletePassword(context.Context, *DeletePasswordReq) (*DeletePasswordResp, error)
|
2016-11-09 20:33:33 +00:00
|
|
|
// GetVersion returns version information of the server.
|
|
|
|
GetVersion(context.Context, *VersionReq) (*VersionResp, error)
|
2016-10-04 05:15:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterDexServer(s *grpc.Server, srv DexServer) {
|
|
|
|
s.RegisterService(&_Dex_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Dex_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CreateClientReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).CreateClient(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/CreateClient",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).CreateClient(ctx, req.(*CreateClientReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Dex_DeleteClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DeleteClientReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).DeleteClient(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/DeleteClient",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).DeleteClient(ctx, req.(*DeleteClientReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2016-10-27 23:28:11 +00:00
|
|
|
func _Dex_CreatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CreatePasswordReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).CreatePassword(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/CreatePassword",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).CreatePassword(ctx, req.(*CreatePasswordReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Dex_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(UpdatePasswordReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).UpdatePassword(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/UpdatePassword",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).UpdatePassword(ctx, req.(*UpdatePasswordReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Dex_DeletePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DeletePasswordReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).DeletePassword(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/DeletePassword",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).DeletePassword(ctx, req.(*DeletePasswordReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2016-11-09 20:33:33 +00:00
|
|
|
func _Dex_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(VersionReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DexServer).GetVersion(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/api.Dex/GetVersion",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DexServer).GetVersion(ctx, req.(*VersionReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2016-10-04 05:15:41 +00:00
|
|
|
var _Dex_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "api.Dex",
|
|
|
|
HandlerType: (*DexServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "CreateClient",
|
|
|
|
Handler: _Dex_CreateClient_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "DeleteClient",
|
|
|
|
Handler: _Dex_DeleteClient_Handler,
|
|
|
|
},
|
2016-10-27 23:28:11 +00:00
|
|
|
{
|
|
|
|
MethodName: "CreatePassword",
|
|
|
|
Handler: _Dex_CreatePassword_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "UpdatePassword",
|
|
|
|
Handler: _Dex_UpdatePassword_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "DeletePassword",
|
|
|
|
Handler: _Dex_DeletePassword_Handler,
|
|
|
|
},
|
2016-11-09 20:33:33 +00:00
|
|
|
{
|
|
|
|
MethodName: "GetVersion",
|
|
|
|
Handler: _Dex_GetVersion_Handler,
|
|
|
|
},
|
2016-10-04 05:15:41 +00:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: fileDescriptor0,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("api/api.proto", fileDescriptor0) }
|
|
|
|
|
|
|
|
var fileDescriptor0 = []byte{
|
2016-11-09 20:33:33 +00:00
|
|
|
// 579 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x54, 0xc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