Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- func RegisterDiscoverServiceServer(s grpc.ServiceRegistrar, srv DiscoverServiceServer)
- func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type AuthenticateRequest
- func (*AuthenticateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateRequest) GetApiKey() string
- func (x *AuthenticateRequest) GetIpAddr() string
- func (x *AuthenticateRequest) GetLifetimeSeconds() uint64
- func (x *AuthenticateRequest) GetOrigin() string
- func (*AuthenticateRequest) ProtoMessage()
- func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
- func (x *AuthenticateRequest) Reset()
- func (x *AuthenticateRequest) String() string
- type AuthenticateResponse
- func (*AuthenticateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateResponse) GetExpiration() uint64
- func (x *AuthenticateResponse) GetJwt() string
- func (x *AuthenticateResponse) GetJwtId() string
- func (x *AuthenticateResponse) GetSuccess() bool
- func (x *AuthenticateResponse) GetUserId() string
- func (*AuthenticateResponse) ProtoMessage()
- func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message
- func (x *AuthenticateResponse) Reset()
- func (x *AuthenticateResponse) String() string
- type DiscoverServiceClient
- type DiscoverServiceServer
- type ReportRequest
- type ReportResponse
- func (*ReportResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReportResponse) GetRevocationReason() string
- func (x *ReportResponse) GetRevoked() bool
- func (*ReportResponse) ProtoMessage()
- func (x *ReportResponse) ProtoReflect() protoreflect.Message
- func (x *ReportResponse) Reset()
- func (x *ReportResponse) String() string
- type ServicesRequest
- type ServicesResponse
- func (*ServicesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServicesResponse) GetAuthEndpoint() string
- func (x *ServicesResponse) GetRevocationEndpoint() string
- func (x *ServicesResponse) GetUsageEndpoint() string
- func (*ServicesResponse) ProtoMessage()
- func (x *ServicesResponse) ProtoReflect() protoreflect.Message
- func (x *ServicesResponse) Reset()
- func (x *ServicesResponse) String() string
- type UnimplementedAuthServiceServer
- type UnimplementedDiscoverServiceServer
- type UnimplementedUsageServiceServer
- type UnsafeAuthServiceServer
- type UnsafeDiscoverServiceServer
- type UnsafeUsageServiceServer
- type UsageServiceClient
- type UsageServiceServer
Constants ¶
const (
AuthService_Authenticate_FullMethodName = "/sf.gateway.payment.v1.AuthService/Authenticate"
)
const (
DiscoverService_Services_FullMethodName = "/sf.gateway.payment.v1.DiscoverService/Services"
)
const (
UsageService_Report_FullMethodName = "/sf.gateway.payment.v1.UsageService/Report"
)
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sf.gateway.payment.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Authenticate", Handler: _AuthService_Authenticate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sf/gateway/payment/v1/gateway.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var DiscoverService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sf.gateway.payment.v1.DiscoverService", HandlerType: (*DiscoverServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Services", Handler: _DiscoverService_Services_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sf/gateway/payment/v1/gateway.proto", }
DiscoverService_ServiceDesc is the grpc.ServiceDesc for DiscoverService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_sf_gateway_payment_v1_gateway_proto protoreflect.FileDescriptor
var UsageService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sf.gateway.payment.v1.UsageService", HandlerType: (*UsageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Report", Handler: _UsageService_Report_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sf/gateway/payment/v1/gateway.proto", }
UsageService_ServiceDesc is the grpc.ServiceDesc for UsageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
func RegisterDiscoverServiceServer ¶
func RegisterDiscoverServiceServer(s grpc.ServiceRegistrar, srv DiscoverServiceServer)
func RegisterUsageServiceServer ¶
func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type AuthenticateRequest ¶
type AuthenticateRequest struct { ApiKey string `protobuf:"bytes,1,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` Origin *string `protobuf:"bytes,2,opt,name=origin,proto3,oneof" json:"origin,omitempty"` IpAddr *string `protobuf:"bytes,3,opt,name=ip_addr,json=ipAddr,proto3,oneof" json:"ip_addr,omitempty"` LifetimeSeconds uint64 `protobuf:"varint,4,opt,name=lifetime_seconds,json=lifetimeSeconds,proto3" json:"lifetime_seconds,omitempty"` // usually long-lived // contains filtered or unexported fields }
func (*AuthenticateRequest) Descriptor
deprecated
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.
func (*AuthenticateRequest) GetApiKey ¶
func (x *AuthenticateRequest) GetApiKey() string
func (*AuthenticateRequest) GetIpAddr ¶
func (x *AuthenticateRequest) GetIpAddr() string
func (*AuthenticateRequest) GetLifetimeSeconds ¶
func (x *AuthenticateRequest) GetLifetimeSeconds() uint64
func (*AuthenticateRequest) GetOrigin ¶
func (x *AuthenticateRequest) GetOrigin() string
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) ProtoReflect ¶
func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
func (*AuthenticateRequest) Reset ¶
func (x *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (x *AuthenticateRequest) String() string
type AuthenticateResponse ¶
type AuthenticateResponse struct { Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"` Expiration uint64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` JwtId string `protobuf:"bytes,5,opt,name=jwt_id,json=jwtId,proto3" json:"jwt_id,omitempty"` //bytes key_authority = 6; // Who signed this? What's the public key? For us to validate whether we will honor this partner. Say this is E&N's, are we configured to honor those keys? // contains filtered or unexported fields }
func (*AuthenticateResponse) Descriptor
deprecated
func (*AuthenticateResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.
func (*AuthenticateResponse) GetExpiration ¶
func (x *AuthenticateResponse) GetExpiration() uint64
func (*AuthenticateResponse) GetJwt ¶
func (x *AuthenticateResponse) GetJwt() string
func (*AuthenticateResponse) GetJwtId ¶
func (x *AuthenticateResponse) GetJwtId() string
func (*AuthenticateResponse) GetSuccess ¶
func (x *AuthenticateResponse) GetSuccess() bool
func (*AuthenticateResponse) GetUserId ¶
func (x *AuthenticateResponse) GetUserId() string
func (*AuthenticateResponse) ProtoMessage ¶
func (*AuthenticateResponse) ProtoMessage()
func (*AuthenticateResponse) ProtoReflect ¶
func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message
func (*AuthenticateResponse) Reset ¶
func (x *AuthenticateResponse) Reset()
func (*AuthenticateResponse) String ¶
func (x *AuthenticateResponse) String() string
type DiscoverServiceClient ¶
type DiscoverServiceClient interface {
Services(ctx context.Context, in *ServicesRequest, opts ...grpc.CallOption) (*ServicesResponse, error)
}
DiscoverServiceClient is the client API for DiscoverService 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 NewDiscoverServiceClient ¶
func NewDiscoverServiceClient(cc grpc.ClientConnInterface) DiscoverServiceClient
type DiscoverServiceServer ¶
type DiscoverServiceServer interface { Services(context.Context, *ServicesRequest) (*ServicesResponse, error) // contains filtered or unexported methods }
DiscoverServiceServer is the server API for DiscoverService service. All implementations must embed UnimplementedDiscoverServiceServer for forward compatibility
type ReportRequest ¶
type ReportRequest struct { Events []*v1.Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
func (*ReportRequest) Descriptor
deprecated
func (*ReportRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReportRequest.ProtoReflect.Descriptor instead.
func (*ReportRequest) GetEvents ¶
func (x *ReportRequest) GetEvents() []*v1.Event
func (*ReportRequest) ProtoMessage ¶
func (*ReportRequest) ProtoMessage()
func (*ReportRequest) ProtoReflect ¶
func (x *ReportRequest) ProtoReflect() protoreflect.Message
func (*ReportRequest) Reset ¶
func (x *ReportRequest) Reset()
func (*ReportRequest) String ¶
func (x *ReportRequest) String() string
type ReportResponse ¶
type ReportResponse struct { Revoked bool `protobuf:"varint,1,opt,name=revoked,proto3" json:"revoked,omitempty"` RevocationReason string `protobuf:"bytes,2,opt,name=revocation_reason,json=revocationReason,proto3" json:"revocation_reason,omitempty"` // contains filtered or unexported fields }
func (*ReportResponse) Descriptor
deprecated
func (*ReportResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReportResponse.ProtoReflect.Descriptor instead.
func (*ReportResponse) GetRevocationReason ¶
func (x *ReportResponse) GetRevocationReason() string
func (*ReportResponse) GetRevoked ¶
func (x *ReportResponse) GetRevoked() bool
func (*ReportResponse) ProtoMessage ¶
func (*ReportResponse) ProtoMessage()
func (*ReportResponse) ProtoReflect ¶
func (x *ReportResponse) ProtoReflect() protoreflect.Message
func (*ReportResponse) Reset ¶
func (x *ReportResponse) Reset()
func (*ReportResponse) String ¶
func (x *ReportResponse) String() string
type ServicesRequest ¶
type ServicesRequest struct {
// contains filtered or unexported fields
}
func (*ServicesRequest) Descriptor
deprecated
func (*ServicesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ServicesRequest.ProtoReflect.Descriptor instead.
func (*ServicesRequest) ProtoMessage ¶
func (*ServicesRequest) ProtoMessage()
func (*ServicesRequest) ProtoReflect ¶
func (x *ServicesRequest) ProtoReflect() protoreflect.Message
func (*ServicesRequest) Reset ¶
func (x *ServicesRequest) Reset()
func (*ServicesRequest) String ¶
func (x *ServicesRequest) String() string
type ServicesResponse ¶
type ServicesResponse struct { UsageEndpoint string `protobuf:"bytes,1,opt,name=usage_endpoint,json=usageEndpoint,proto3" json:"usage_endpoint,omitempty"` // points to the "Usage" service endpoint AuthEndpoint string `protobuf:"bytes,2,opt,name=auth_endpoint,json=authEndpoint,proto3" json:"auth_endpoint,omitempty"` // .. for "Auth" RevocationEndpoint string `protobuf:"bytes,3,opt,name=revocation_endpoint,json=revocationEndpoint,proto3" json:"revocation_endpoint,omitempty"` // .. for "Revocation" // contains filtered or unexported fields }
func (*ServicesResponse) Descriptor
deprecated
func (*ServicesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServicesResponse.ProtoReflect.Descriptor instead.
func (*ServicesResponse) GetAuthEndpoint ¶
func (x *ServicesResponse) GetAuthEndpoint() string
func (*ServicesResponse) GetRevocationEndpoint ¶
func (x *ServicesResponse) GetRevocationEndpoint() string
func (*ServicesResponse) GetUsageEndpoint ¶
func (x *ServicesResponse) GetUsageEndpoint() string
func (*ServicesResponse) ProtoMessage ¶
func (*ServicesResponse) ProtoMessage()
func (*ServicesResponse) ProtoReflect ¶
func (x *ServicesResponse) ProtoReflect() protoreflect.Message
func (*ServicesResponse) Reset ¶
func (x *ServicesResponse) Reset()
func (*ServicesResponse) String ¶
func (x *ServicesResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) Authenticate ¶
func (UnimplementedAuthServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
type UnimplementedDiscoverServiceServer ¶
type UnimplementedDiscoverServiceServer struct { }
UnimplementedDiscoverServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDiscoverServiceServer) Services ¶
func (UnimplementedDiscoverServiceServer) Services(context.Context, *ServicesRequest) (*ServicesResponse, error)
type UnimplementedUsageServiceServer ¶
type UnimplementedUsageServiceServer struct { }
UnimplementedUsageServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUsageServiceServer) Report ¶
func (UnimplementedUsageServiceServer) Report(context.Context, *ReportRequest) (*ReportResponse, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UnsafeDiscoverServiceServer ¶
type UnsafeDiscoverServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDiscoverServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiscoverServiceServer will result in compilation errors.
type UnsafeUsageServiceServer ¶
type UnsafeUsageServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUsageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsageServiceServer will result in compilation errors.
type UsageServiceClient ¶
type UsageServiceClient interface {
Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error)
}
UsageServiceClient is the client API for UsageService 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 NewUsageServiceClient ¶
func NewUsageServiceClient(cc grpc.ClientConnInterface) UsageServiceClient
type UsageServiceServer ¶
type UsageServiceServer interface { Report(context.Context, *ReportRequest) (*ReportResponse, error) // contains filtered or unexported methods }
UsageServiceServer is the server API for UsageService service. All implementations must embed UnimplementedUsageServiceServer for forward compatibility