grpc_shiro_v1

package
v0.0.0-...-7077701 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DefaultPort = 30014
	ServiceName = "shiro"
)

Variables

View Source
var (
	// LbsV1LocalAddress exposes the local address that is used if we run with DNS disabled
	V1LocalAddress = fmt.Sprintf(":%d", DefaultPort)
)

Functions

func RegisterUnifiedUserManagementServer

func RegisterUnifiedUserManagementServer(s *grpc.Server, srv UnifiedUserManagementServer)

Types

type AddDomainRealmRequest

type AddDomainRealmRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddDomainRealmRequest) Descriptor

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

func (*AddDomainRealmRequest) ProtoMessage

func (*AddDomainRealmRequest) ProtoMessage()

func (*AddDomainRealmRequest) Reset

func (m *AddDomainRealmRequest) Reset()

func (*AddDomainRealmRequest) String

func (m *AddDomainRealmRequest) String() string

func (*AddDomainRealmRequest) XXX_DiscardUnknown

func (m *AddDomainRealmRequest) XXX_DiscardUnknown()

func (*AddDomainRealmRequest) XXX_Marshal

func (m *AddDomainRealmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddDomainRealmRequest) XXX_Merge

func (dst *AddDomainRealmRequest) XXX_Merge(src proto.Message)

func (*AddDomainRealmRequest) XXX_Size

func (m *AddDomainRealmRequest) XXX_Size() int

func (*AddDomainRealmRequest) XXX_Unmarshal

func (m *AddDomainRealmRequest) XXX_Unmarshal(b []byte) error

type AddDomainRealmResponse

type AddDomainRealmResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddDomainRealmResponse) Descriptor

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

func (*AddDomainRealmResponse) ProtoMessage

func (*AddDomainRealmResponse) ProtoMessage()

func (*AddDomainRealmResponse) Reset

func (m *AddDomainRealmResponse) Reset()

func (*AddDomainRealmResponse) String

func (m *AddDomainRealmResponse) String() string

func (*AddDomainRealmResponse) XXX_DiscardUnknown

func (m *AddDomainRealmResponse) XXX_DiscardUnknown()

func (*AddDomainRealmResponse) XXX_Marshal

func (m *AddDomainRealmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddDomainRealmResponse) XXX_Merge

func (dst *AddDomainRealmResponse) XXX_Merge(src proto.Message)

func (*AddDomainRealmResponse) XXX_Size

func (m *AddDomainRealmResponse) XXX_Size() int

func (*AddDomainRealmResponse) XXX_Unmarshal

func (m *AddDomainRealmResponse) XXX_Unmarshal(b []byte) error

type AuthenticateRequest

type AuthenticateRequest struct {
	Username             string   `protobuf:"bytes,1,opt,name=Username,proto3" json:"Username,omitempty" bson:"Username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty" bson:"Password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthenticateRequest) Descriptor

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

func (*AuthenticateRequest) GetPassword

func (m *AuthenticateRequest) GetPassword() string

func (*AuthenticateRequest) GetUsername

func (m *AuthenticateRequest) GetUsername() string

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) Reset

func (m *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (m *AuthenticateRequest) String() string

func (*AuthenticateRequest) XXX_DiscardUnknown

func (m *AuthenticateRequest) XXX_DiscardUnknown()

func (*AuthenticateRequest) XXX_Marshal

func (m *AuthenticateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthenticateRequest) XXX_Merge

func (dst *AuthenticateRequest) XXX_Merge(src proto.Message)

func (*AuthenticateRequest) XXX_Size

func (m *AuthenticateRequest) XXX_Size() int

func (*AuthenticateRequest) XXX_Unmarshal

func (m *AuthenticateRequest) XXX_Unmarshal(b []byte) error

type AuthenticateResponse

type AuthenticateResponse struct {
	Token                string   `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty" bson:"Token,omitempty"`
	Roles                []string `protobuf:"bytes,2,rep,name=Roles,proto3" json:"Roles,omitempty" bson:"Roles,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthenticateResponse) Descriptor

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

func (*AuthenticateResponse) GetRoles

func (m *AuthenticateResponse) GetRoles() []string

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

func (*AuthenticateResponse) XXX_DiscardUnknown

func (m *AuthenticateResponse) XXX_DiscardUnknown()

func (*AuthenticateResponse) XXX_Marshal

func (m *AuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthenticateResponse) XXX_Merge

func (dst *AuthenticateResponse) XXX_Merge(src proto.Message)

func (*AuthenticateResponse) XXX_Size

func (m *AuthenticateResponse) XXX_Size() int

func (*AuthenticateResponse) XXX_Unmarshal

func (m *AuthenticateResponse) XXX_Unmarshal(b []byte) error

type Client

type Client interface {
	UserManager() UnifiedUserManagementClient
	Close() error
}

Client is a client interface for interacting with the tuning service.

func NewClient

func NewClient() (Client, error)

NewClient create a new load-balanced client to talk to the Tuning service. If the dns_server config option is set to 'disabled', it will default to the pre-defined LocalPort of the service.

func NewWithAddress

func NewWithAddress(addr string) (Client, error)

NewWithAddress create a new load-balanced client to talk to the Tuning service. If the dns_server config option is set to 'disabled', it will default to the pre-defined LocalPort of the service.

type GetRolePermissionsRequest

type GetRolePermissionsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRolePermissionsRequest) Descriptor

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

func (*GetRolePermissionsRequest) ProtoMessage

func (*GetRolePermissionsRequest) ProtoMessage()

func (*GetRolePermissionsRequest) Reset

func (m *GetRolePermissionsRequest) Reset()

func (*GetRolePermissionsRequest) String

func (m *GetRolePermissionsRequest) String() string

func (*GetRolePermissionsRequest) XXX_DiscardUnknown

func (m *GetRolePermissionsRequest) XXX_DiscardUnknown()

func (*GetRolePermissionsRequest) XXX_Marshal

func (m *GetRolePermissionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRolePermissionsRequest) XXX_Merge

func (dst *GetRolePermissionsRequest) XXX_Merge(src proto.Message)

func (*GetRolePermissionsRequest) XXX_Size

func (m *GetRolePermissionsRequest) XXX_Size() int

func (*GetRolePermissionsRequest) XXX_Unmarshal

func (m *GetRolePermissionsRequest) XXX_Unmarshal(b []byte) error

type GetRolePermissionsResponse

type GetRolePermissionsResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRolePermissionsResponse) Descriptor

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

func (*GetRolePermissionsResponse) ProtoMessage

func (*GetRolePermissionsResponse) ProtoMessage()

func (*GetRolePermissionsResponse) Reset

func (m *GetRolePermissionsResponse) Reset()

func (*GetRolePermissionsResponse) String

func (m *GetRolePermissionsResponse) String() string

func (*GetRolePermissionsResponse) XXX_DiscardUnknown

func (m *GetRolePermissionsResponse) XXX_DiscardUnknown()

func (*GetRolePermissionsResponse) XXX_Marshal

func (m *GetRolePermissionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRolePermissionsResponse) XXX_Merge

func (dst *GetRolePermissionsResponse) XXX_Merge(src proto.Message)

func (*GetRolePermissionsResponse) XXX_Size

func (m *GetRolePermissionsResponse) XXX_Size() int

func (*GetRolePermissionsResponse) XXX_Unmarshal

func (m *GetRolePermissionsResponse) XXX_Unmarshal(b []byte) error

type UnifiedUserManagementClient

type UnifiedUserManagementClient interface {
	// Authenticate authenticate the principal in specific domain realm
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
	// AddDomainRealm adds specific realm
	AddDomainRealm(ctx context.Context, in *AddDomainRealmRequest, opts ...grpc.CallOption) (*AddDomainRealmResponse, error)
	// GetRolePermissions return role's dynamica route path
	GetRolePermissions(ctx context.Context, in *GetRolePermissionsRequest, opts ...grpc.CallOption) (*GetRolePermissionsResponse, error)
}

UnifiedUserManagementClient is the client API for UnifiedUserManagement service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUnifiedUserManagementClient

func NewUnifiedUserManagementClient(cc *grpc.ClientConn) UnifiedUserManagementClient

type UnifiedUserManagementServer

type UnifiedUserManagementServer interface {
	// Authenticate authenticate the principal in specific domain realm
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	// AddDomainRealm adds specific realm
	AddDomainRealm(context.Context, *AddDomainRealmRequest) (*AddDomainRealmResponse, error)
	// GetRolePermissions return role's dynamica route path
	GetRolePermissions(context.Context, *GetRolePermissionsRequest) (*GetRolePermissionsResponse, error)
}

UnifiedUserManagementServer is the server API for UnifiedUserManagement service.

Jump to

Keyboard shortcuts

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