Documentation
¶
Overview ¶
Package users is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterUsersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error
- func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUsersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServer) error
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type AccountProvider
- func (*AccountProvider) Descriptor() ([]byte, []int)deprecated
- func (x *AccountProvider) GetAvatarUrl() string
- func (x *AccountProvider) GetCreatedAt() *timestamp.Timestamp
- func (x *AccountProvider) GetDisplayName() string
- func (x *AccountProvider) GetEmail() string
- func (x *AccountProvider) GetProviderId() string
- func (x *AccountProvider) GetProviderType() string
- func (x *AccountProvider) GetUpdatedAt() *timestamp.Timestamp
- func (*AccountProvider) ProtoMessage()
- func (x *AccountProvider) ProtoReflect() protoreflect.Message
- func (x *AccountProvider) Reset()
- func (x *AccountProvider) String() string
- type ListUsersRequest
- func (*ListUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest) GetDomainId() string
- func (x *ListUsersRequest) GetDomainType() authorization.DomainType
- func (x *ListUsersRequest) GetIncludeRoles() bool
- func (*ListUsersRequest) ProtoMessage()
- func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest) Reset()
- func (x *ListUsersRequest) String() string
- type ListUsersResponse
- type RoleAssignment
- func (*RoleAssignment) Descriptor() ([]byte, []int)deprecated
- func (x *RoleAssignment) GetAssignedAt() *timestamp.Timestamp
- func (x *RoleAssignment) GetDomainId() string
- func (x *RoleAssignment) GetDomainType() authorization.DomainType
- func (x *RoleAssignment) GetRoleDescription() string
- func (x *RoleAssignment) GetRoleDisplayName() string
- func (x *RoleAssignment) GetRoleName() string
- func (*RoleAssignment) ProtoMessage()
- func (x *RoleAssignment) ProtoReflect() protoreflect.Message
- func (x *RoleAssignment) Reset()
- func (x *RoleAssignment) String() string
- type UnimplementedUsersServer
- type UnsafeUsersServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetMetadata() *User_Metadata
- func (x *User) GetSpec() *User_Spec
- func (x *User) GetStatus() *User_Status
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type User_Metadata
- func (*User_Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *User_Metadata) GetCreatedAt() *timestamp.Timestamp
- func (x *User_Metadata) GetEmail() string
- func (x *User_Metadata) GetId() string
- func (x *User_Metadata) GetUpdatedAt() *timestamp.Timestamp
- func (*User_Metadata) ProtoMessage()
- func (x *User_Metadata) ProtoReflect() protoreflect.Message
- func (x *User_Metadata) Reset()
- func (x *User_Metadata) String() string
- type User_Spec
- type User_Status
- func (*User_Status) Descriptor() ([]byte, []int)deprecated
- func (x *User_Status) GetAccountProviders() []*AccountProvider
- func (x *User_Status) GetRoles() []*RoleAssignment
- func (*User_Status) ProtoMessage()
- func (x *User_Status) ProtoReflect() protoreflect.Message
- func (x *User_Status) Reset()
- func (x *User_Status) String() string
- type UsersClient
- type UsersServer
Constants ¶
const (
Users_ListUsers_FullMethodName = "/Superplane.Users.Users/ListUsers"
)
Variables ¶
var File_users_proto protoreflect.FileDescriptor
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Superplane.Users.Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListUsers", Handler: _Users_ListUsers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersHandler ¶
RegisterUsersHandler registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUsersHandlerClient ¶
func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error
RegisterUsersHandlerClient registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsersClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsersClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsersClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUsersHandlerFromEndpoint ¶
func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUsersHandlerFromEndpoint is same as RegisterUsersHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUsersHandlerServer ¶
func RegisterUsersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServer) error
RegisterUsersHandlerServer registers the http handlers for service Users to "mux". UnaryRPC :call UsersServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUsersHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type AccountProvider ¶
type AccountProvider struct {
ProviderType string `protobuf:"bytes,1,opt,name=provider_type,json=providerType,proto3" json:"provider_type,omitempty"`
ProviderId string `protobuf:"bytes,2,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
AvatarUrl string `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*AccountProvider) Descriptor
deprecated
func (*AccountProvider) Descriptor() ([]byte, []int)
Deprecated: Use AccountProvider.ProtoReflect.Descriptor instead.
func (*AccountProvider) GetAvatarUrl ¶
func (x *AccountProvider) GetAvatarUrl() string
func (*AccountProvider) GetCreatedAt ¶
func (x *AccountProvider) GetCreatedAt() *timestamp.Timestamp
func (*AccountProvider) GetDisplayName ¶
func (x *AccountProvider) GetDisplayName() string
func (*AccountProvider) GetEmail ¶
func (x *AccountProvider) GetEmail() string
func (*AccountProvider) GetProviderId ¶
func (x *AccountProvider) GetProviderId() string
func (*AccountProvider) GetProviderType ¶
func (x *AccountProvider) GetProviderType() string
func (*AccountProvider) GetUpdatedAt ¶
func (x *AccountProvider) GetUpdatedAt() *timestamp.Timestamp
func (*AccountProvider) ProtoMessage ¶
func (*AccountProvider) ProtoMessage()
func (*AccountProvider) ProtoReflect ¶
func (x *AccountProvider) ProtoReflect() protoreflect.Message
func (*AccountProvider) Reset ¶
func (x *AccountProvider) Reset()
func (*AccountProvider) String ¶
func (x *AccountProvider) String() string
type ListUsersRequest ¶
type ListUsersRequest struct {
DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
DomainId string `protobuf:"bytes,2,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
IncludeRoles bool `protobuf:"varint,3,opt,name=include_roles,json=includeRoles,proto3" json:"include_roles,omitempty"`
// contains filtered or unexported fields
}
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) GetDomainId ¶
func (x *ListUsersRequest) GetDomainId() string
func (*ListUsersRequest) GetDomainType ¶
func (x *ListUsersRequest) GetDomainType() authorization.DomainType
func (*ListUsersRequest) GetIncludeRoles ¶ added in v0.16.0
func (x *ListUsersRequest) GetIncludeRoles() bool
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type ListUsersResponse ¶
type ListUsersResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListUsersResponse) Descriptor
deprecated
func (*ListUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.
func (*ListUsersResponse) GetUsers ¶
func (x *ListUsersResponse) GetUsers() []*User
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) ProtoReflect ¶
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
func (*ListUsersResponse) Reset ¶
func (x *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (x *ListUsersResponse) String() string
type RoleAssignment ¶ added in v0.16.0
type RoleAssignment struct {
RoleName string `protobuf:"bytes,1,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"`
RoleDisplayName string `protobuf:"bytes,2,opt,name=role_display_name,json=roleDisplayName,proto3" json:"role_display_name,omitempty"`
RoleDescription string `protobuf:"bytes,3,opt,name=role_description,json=roleDescription,proto3" json:"role_description,omitempty"`
DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
DomainId string `protobuf:"bytes,5,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
AssignedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=assigned_at,json=assignedAt,proto3" json:"assigned_at,omitempty"`
// contains filtered or unexported fields
}
func (*RoleAssignment) Descriptor
deprecated
added in
v0.16.0
func (*RoleAssignment) Descriptor() ([]byte, []int)
Deprecated: Use RoleAssignment.ProtoReflect.Descriptor instead.
func (*RoleAssignment) GetAssignedAt ¶ added in v0.16.0
func (x *RoleAssignment) GetAssignedAt() *timestamp.Timestamp
func (*RoleAssignment) GetDomainId ¶ added in v0.16.0
func (x *RoleAssignment) GetDomainId() string
func (*RoleAssignment) GetDomainType ¶ added in v0.16.0
func (x *RoleAssignment) GetDomainType() authorization.DomainType
func (*RoleAssignment) GetRoleDescription ¶ added in v0.16.0
func (x *RoleAssignment) GetRoleDescription() string
func (*RoleAssignment) GetRoleDisplayName ¶ added in v0.16.0
func (x *RoleAssignment) GetRoleDisplayName() string
func (*RoleAssignment) GetRoleName ¶ added in v0.16.0
func (x *RoleAssignment) GetRoleName() string
func (*RoleAssignment) ProtoMessage ¶ added in v0.16.0
func (*RoleAssignment) ProtoMessage()
func (*RoleAssignment) ProtoReflect ¶ added in v0.16.0
func (x *RoleAssignment) ProtoReflect() protoreflect.Message
func (*RoleAssignment) Reset ¶ added in v0.16.0
func (x *RoleAssignment) Reset()
func (*RoleAssignment) String ¶ added in v0.16.0
func (x *RoleAssignment) String() string
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct{}
UnimplementedUsersServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUsersServer) ListUsers ¶
func (UnimplementedUsersServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type User ¶
type User struct {
Metadata *User_Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Spec *User_Spec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
Status *User_Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetMetadata ¶
func (x *User) GetMetadata() *User_Metadata
func (*User) GetStatus ¶
func (x *User) GetStatus() *User_Status
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type User_Metadata ¶
type User_Metadata struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*User_Metadata) Descriptor
deprecated
func (*User_Metadata) Descriptor() ([]byte, []int)
Deprecated: Use User_Metadata.ProtoReflect.Descriptor instead.
func (*User_Metadata) GetCreatedAt ¶
func (x *User_Metadata) GetCreatedAt() *timestamp.Timestamp
func (*User_Metadata) GetEmail ¶
func (x *User_Metadata) GetEmail() string
func (*User_Metadata) GetId ¶
func (x *User_Metadata) GetId() string
func (*User_Metadata) GetUpdatedAt ¶
func (x *User_Metadata) GetUpdatedAt() *timestamp.Timestamp
func (*User_Metadata) ProtoMessage ¶
func (*User_Metadata) ProtoMessage()
func (*User_Metadata) ProtoReflect ¶
func (x *User_Metadata) ProtoReflect() protoreflect.Message
func (*User_Metadata) Reset ¶
func (x *User_Metadata) Reset()
func (*User_Metadata) String ¶
func (x *User_Metadata) String() string
type User_Spec ¶
type User_Spec struct {
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// contains filtered or unexported fields
}
func (*User_Spec) Descriptor
deprecated
func (*User_Spec) GetDisplayName ¶
func (*User_Spec) ProtoMessage ¶
func (*User_Spec) ProtoMessage()
func (*User_Spec) ProtoReflect ¶
func (x *User_Spec) ProtoReflect() protoreflect.Message
type User_Status ¶
type User_Status struct {
AccountProviders []*AccountProvider `protobuf:"bytes,1,rep,name=account_providers,json=accountProviders,proto3" json:"account_providers,omitempty"`
Roles []*RoleAssignment `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
// contains filtered or unexported fields
}
func (*User_Status) Descriptor
deprecated
func (*User_Status) Descriptor() ([]byte, []int)
Deprecated: Use User_Status.ProtoReflect.Descriptor instead.
func (*User_Status) GetAccountProviders ¶ added in v0.16.0
func (x *User_Status) GetAccountProviders() []*AccountProvider
func (*User_Status) GetRoles ¶ added in v0.16.0
func (x *User_Status) GetRoles() []*RoleAssignment
func (*User_Status) ProtoMessage ¶
func (*User_Status) ProtoMessage()
func (*User_Status) ProtoReflect ¶
func (x *User_Status) ProtoReflect() protoreflect.Message
func (*User_Status) Reset ¶
func (x *User_Status) Reset()
func (*User_Status) String ¶
func (x *User_Status) String() string
type UsersClient ¶
type UsersClient interface {
// Endpoint for getting all users in a domain
// Operation is synchronous and idempotent.
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
}
UsersClient is the client API for Users service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface {
// Endpoint for getting all users in a domain
// Operation is synchronous and idempotent.
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
}
UsersServer is the server API for Users service. All implementations should embed UnimplementedUsersServer for forward compatibility.