Documentation ¶
Overview ¶
Package license is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterLicenseHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLicenseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LicenseClient) error
- func RegisterLicenseHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLicenseHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LicenseServer) error
- func RegisterLicenseServer(s *grpc.Server, srv LicenseServer)
- type ApplyLicenseReq
- type ApplyLicenseResp
- type GetStatusReq
- type GetStatusResp
- func (*GetStatusResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetStatusResp) GetConfiguredAt() *timestamppb.Timestamp
- func (x *GetStatusResp) GetCustomerName() string
- func (x *GetStatusResp) GetGracePeriod() bool
- func (x *GetStatusResp) GetLicenseId() string
- func (x *GetStatusResp) GetLicenseType() string
- func (x *GetStatusResp) GetLicensedPeriod() *GetStatusResp_DateRange
- func (*GetStatusResp) ProtoMessage()
- func (x *GetStatusResp) ProtoReflect() protoreflect.Message
- func (x *GetStatusResp) Reset()
- func (x *GetStatusResp) String() string
- type GetStatusResp_DateRange
- func (*GetStatusResp_DateRange) Descriptor() ([]byte, []int)deprecated
- func (x *GetStatusResp_DateRange) GetEnd() *timestamppb.Timestamp
- func (x *GetStatusResp_DateRange) GetStart() *timestamppb.Timestamp
- func (*GetStatusResp_DateRange) ProtoMessage()
- func (x *GetStatusResp_DateRange) ProtoReflect() protoreflect.Message
- func (x *GetStatusResp_DateRange) Reset()
- func (x *GetStatusResp_DateRange) String() string
- type LicenseClient
- type LicenseServer
- type LicenseServerMock
- func (m *LicenseServerMock) ApplyLicense(ctx context.Context, req *ApplyLicenseReq) (*ApplyLicenseResp, error)
- func (m *LicenseServerMock) GetStatus(ctx context.Context, req *GetStatusReq) (*GetStatusResp, error)
- func (m *LicenseServerMock) RequestLicense(ctx context.Context, req *RequestLicenseReq) (*RequestLicenseResp, error)
- func (m *LicenseServerMock) Reset()
- type RequestLicenseReq
- func (*RequestLicenseReq) Descriptor() ([]byte, []int)deprecated
- func (x *RequestLicenseReq) GetEmail() string
- func (x *RequestLicenseReq) GetFirstName() string
- func (x *RequestLicenseReq) GetGdprAgree() bool
- func (x *RequestLicenseReq) GetLastName() string
- func (*RequestLicenseReq) ProtoMessage()
- func (x *RequestLicenseReq) ProtoReflect() protoreflect.Message
- func (x *RequestLicenseReq) Reset()
- func (x *RequestLicenseReq) String() string
- type RequestLicenseResp
- func (*RequestLicenseResp) Descriptor() ([]byte, []int)deprecated
- func (x *RequestLicenseResp) GetLicense() stringdeprecated
- func (x *RequestLicenseResp) GetStatus() *GetStatusResp
- func (*RequestLicenseResp) ProtoMessage()
- func (x *RequestLicenseResp) ProtoReflect() protoreflect.Message
- func (x *RequestLicenseResp) Reset()
- func (x *RequestLicenseResp) String() string
- type UnimplementedLicenseServer
- func (*UnimplementedLicenseServer) ApplyLicense(context.Context, *ApplyLicenseReq) (*ApplyLicenseResp, error)
- func (*UnimplementedLicenseServer) GetStatus(context.Context, *GetStatusReq) (*GetStatusResp, error)
- func (*UnimplementedLicenseServer) RequestLicense(context.Context, *RequestLicenseReq) (*RequestLicenseResp, error)
Constants ¶
This section is empty.
Variables ¶
var File_automate_gateway_api_license_license_proto protoreflect.FileDescriptor
Functions ¶
func RegisterLicenseHandler ¶
func RegisterLicenseHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLicenseHandler registers the http handlers for service License to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLicenseHandlerClient ¶
func RegisterLicenseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LicenseClient) error
RegisterLicenseHandlerClient registers the http handlers for service License to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LicenseClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LicenseClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LicenseClient" to call the correct interceptors.
func RegisterLicenseHandlerFromEndpoint ¶
func RegisterLicenseHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLicenseHandlerFromEndpoint is same as RegisterLicenseHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLicenseHandlerServer ¶
func RegisterLicenseHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LicenseServer) error
RegisterLicenseHandlerServer registers the http handlers for service License to "mux". UnaryRPC :call LicenseServer 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 RegisterLicenseHandlerFromEndpoint instead.
func RegisterLicenseServer ¶
func RegisterLicenseServer(s *grpc.Server, srv LicenseServer)
Types ¶
type ApplyLicenseReq ¶
type ApplyLicenseReq struct { License string `protobuf:"bytes,1,opt,name=license,proto3" json:"license,omitempty"` // contains filtered or unexported fields }
func (*ApplyLicenseReq) Descriptor
deprecated
func (*ApplyLicenseReq) Descriptor() ([]byte, []int)
Deprecated: Use ApplyLicenseReq.ProtoReflect.Descriptor instead.
func (*ApplyLicenseReq) GetLicense ¶
func (x *ApplyLicenseReq) GetLicense() string
func (*ApplyLicenseReq) ProtoMessage ¶
func (*ApplyLicenseReq) ProtoMessage()
func (*ApplyLicenseReq) ProtoReflect ¶
func (x *ApplyLicenseReq) ProtoReflect() protoreflect.Message
func (*ApplyLicenseReq) Reset ¶
func (x *ApplyLicenseReq) Reset()
func (*ApplyLicenseReq) String ¶
func (x *ApplyLicenseReq) String() string
type ApplyLicenseResp ¶
type ApplyLicenseResp struct { Status *GetStatusResp `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ApplyLicenseResp) Descriptor
deprecated
func (*ApplyLicenseResp) Descriptor() ([]byte, []int)
Deprecated: Use ApplyLicenseResp.ProtoReflect.Descriptor instead.
func (*ApplyLicenseResp) GetStatus ¶
func (x *ApplyLicenseResp) GetStatus() *GetStatusResp
func (*ApplyLicenseResp) ProtoMessage ¶
func (*ApplyLicenseResp) ProtoMessage()
func (*ApplyLicenseResp) ProtoReflect ¶
func (x *ApplyLicenseResp) ProtoReflect() protoreflect.Message
func (*ApplyLicenseResp) Reset ¶
func (x *ApplyLicenseResp) Reset()
func (*ApplyLicenseResp) String ¶
func (x *ApplyLicenseResp) String() string
type GetStatusReq ¶
type GetStatusReq struct {
// contains filtered or unexported fields
}
func (*GetStatusReq) Descriptor
deprecated
func (*GetStatusReq) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusReq.ProtoReflect.Descriptor instead.
func (*GetStatusReq) ProtoMessage ¶
func (*GetStatusReq) ProtoMessage()
func (*GetStatusReq) ProtoReflect ¶
func (x *GetStatusReq) ProtoReflect() protoreflect.Message
func (*GetStatusReq) Reset ¶
func (x *GetStatusReq) Reset()
func (*GetStatusReq) String ¶
func (x *GetStatusReq) String() string
type GetStatusResp ¶
type GetStatusResp struct { LicenseId string `protobuf:"bytes,1,opt,name=license_id,json=licenseId,proto3" json:"license_id,omitempty"` ConfiguredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=configured_at,json=configuredAt,proto3" json:"configured_at,omitempty"` LicensedPeriod *GetStatusResp_DateRange `protobuf:"bytes,3,opt,name=licensed_period,json=licensedPeriod,proto3" json:"licensed_period,omitempty"` CustomerName string `protobuf:"bytes,4,opt,name=customer_name,json=customerName,proto3" json:"customer_name,omitempty"` GracePeriod bool `protobuf:"varint,5,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"` LicenseType string `protobuf:"bytes,6,opt,name=license_type,json=licenseType,proto3" json:"license_type,omitempty"` // contains filtered or unexported fields }
func (*GetStatusResp) Descriptor
deprecated
func (*GetStatusResp) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusResp.ProtoReflect.Descriptor instead.
func (*GetStatusResp) GetConfiguredAt ¶
func (x *GetStatusResp) GetConfiguredAt() *timestamppb.Timestamp
func (*GetStatusResp) GetCustomerName ¶
func (x *GetStatusResp) GetCustomerName() string
func (*GetStatusResp) GetGracePeriod ¶
func (x *GetStatusResp) GetGracePeriod() bool
func (*GetStatusResp) GetLicenseId ¶
func (x *GetStatusResp) GetLicenseId() string
func (*GetStatusResp) GetLicenseType ¶
func (x *GetStatusResp) GetLicenseType() string
func (*GetStatusResp) GetLicensedPeriod ¶
func (x *GetStatusResp) GetLicensedPeriod() *GetStatusResp_DateRange
func (*GetStatusResp) ProtoMessage ¶
func (*GetStatusResp) ProtoMessage()
func (*GetStatusResp) ProtoReflect ¶
func (x *GetStatusResp) ProtoReflect() protoreflect.Message
func (*GetStatusResp) Reset ¶
func (x *GetStatusResp) Reset()
func (*GetStatusResp) String ¶
func (x *GetStatusResp) String() string
type GetStatusResp_DateRange ¶
type GetStatusResp_DateRange struct { Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
func (*GetStatusResp_DateRange) Descriptor
deprecated
func (*GetStatusResp_DateRange) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusResp_DateRange.ProtoReflect.Descriptor instead.
func (*GetStatusResp_DateRange) GetEnd ¶
func (x *GetStatusResp_DateRange) GetEnd() *timestamppb.Timestamp
func (*GetStatusResp_DateRange) GetStart ¶
func (x *GetStatusResp_DateRange) GetStart() *timestamppb.Timestamp
func (*GetStatusResp_DateRange) ProtoMessage ¶
func (*GetStatusResp_DateRange) ProtoMessage()
func (*GetStatusResp_DateRange) ProtoReflect ¶
func (x *GetStatusResp_DateRange) ProtoReflect() protoreflect.Message
func (*GetStatusResp_DateRange) Reset ¶
func (x *GetStatusResp_DateRange) Reset()
func (*GetStatusResp_DateRange) String ¶
func (x *GetStatusResp_DateRange) String() string
type LicenseClient ¶
type LicenseClient interface { ApplyLicense(ctx context.Context, in *ApplyLicenseReq, opts ...grpc.CallOption) (*ApplyLicenseResp, error) GetStatus(ctx context.Context, in *GetStatusReq, opts ...grpc.CallOption) (*GetStatusResp, error) RequestLicense(ctx context.Context, in *RequestLicenseReq, opts ...grpc.CallOption) (*RequestLicenseResp, error) }
LicenseClient is the client API for License service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLicenseClient ¶
func NewLicenseClient(cc grpc.ClientConnInterface) LicenseClient
type LicenseServer ¶
type LicenseServer interface { ApplyLicense(context.Context, *ApplyLicenseReq) (*ApplyLicenseResp, error) GetStatus(context.Context, *GetStatusReq) (*GetStatusResp, error) RequestLicense(context.Context, *RequestLicenseReq) (*RequestLicenseResp, error) }
LicenseServer is the server API for License service.
type LicenseServerMock ¶
type LicenseServerMock struct { ApplyLicenseFunc func(context.Context, *ApplyLicenseReq) (*ApplyLicenseResp, error) GetStatusFunc func(context.Context, *GetStatusReq) (*GetStatusResp, error) RequestLicenseFunc func(context.Context, *RequestLicenseReq) (*RequestLicenseResp, error) // contains filtered or unexported fields }
LicenseServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewLicenseServerMock ¶
func NewLicenseServerMock() *LicenseServerMock
NewLicenseServerMock gives you a fresh instance of LicenseServerMock.
func NewLicenseServerMockWithoutValidation ¶
func NewLicenseServerMockWithoutValidation() *LicenseServerMock
NewLicenseServerMockWithoutValidation gives you a fresh instance of LicenseServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*LicenseServerMock) ApplyLicense ¶
func (m *LicenseServerMock) ApplyLicense(ctx context.Context, req *ApplyLicenseReq) (*ApplyLicenseResp, error)
func (*LicenseServerMock) GetStatus ¶
func (m *LicenseServerMock) GetStatus(ctx context.Context, req *GetStatusReq) (*GetStatusResp, error)
func (*LicenseServerMock) RequestLicense ¶
func (m *LicenseServerMock) RequestLicense(ctx context.Context, req *RequestLicenseReq) (*RequestLicenseResp, error)
func (*LicenseServerMock) Reset ¶
func (m *LicenseServerMock) Reset()
Reset resets all overridden functions
type RequestLicenseReq ¶
type RequestLicenseReq struct { FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` GdprAgree bool `protobuf:"varint,4,opt,name=gdpr_agree,json=gdprAgree,proto3" json:"gdpr_agree,omitempty"` // contains filtered or unexported fields }
func (*RequestLicenseReq) Descriptor
deprecated
func (*RequestLicenseReq) Descriptor() ([]byte, []int)
Deprecated: Use RequestLicenseReq.ProtoReflect.Descriptor instead.
func (*RequestLicenseReq) GetEmail ¶
func (x *RequestLicenseReq) GetEmail() string
func (*RequestLicenseReq) GetFirstName ¶
func (x *RequestLicenseReq) GetFirstName() string
func (*RequestLicenseReq) GetGdprAgree ¶
func (x *RequestLicenseReq) GetGdprAgree() bool
func (*RequestLicenseReq) GetLastName ¶
func (x *RequestLicenseReq) GetLastName() string
func (*RequestLicenseReq) ProtoMessage ¶
func (*RequestLicenseReq) ProtoMessage()
func (*RequestLicenseReq) ProtoReflect ¶
func (x *RequestLicenseReq) ProtoReflect() protoreflect.Message
func (*RequestLicenseReq) Reset ¶
func (x *RequestLicenseReq) Reset()
func (*RequestLicenseReq) String ¶
func (x *RequestLicenseReq) String() string
type RequestLicenseResp ¶
type RequestLicenseResp struct { // Deprecated: Marked as deprecated in automate-gateway/api/license/license.proto. License string `protobuf:"bytes,1,opt,name=license,proto3" json:"license,omitempty"` Status *GetStatusResp `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*RequestLicenseResp) Descriptor
deprecated
func (*RequestLicenseResp) Descriptor() ([]byte, []int)
Deprecated: Use RequestLicenseResp.ProtoReflect.Descriptor instead.
func (*RequestLicenseResp) GetLicense
deprecated
func (x *RequestLicenseResp) GetLicense() string
Deprecated: Marked as deprecated in automate-gateway/api/license/license.proto.
func (*RequestLicenseResp) GetStatus ¶
func (x *RequestLicenseResp) GetStatus() *GetStatusResp
func (*RequestLicenseResp) ProtoMessage ¶
func (*RequestLicenseResp) ProtoMessage()
func (*RequestLicenseResp) ProtoReflect ¶
func (x *RequestLicenseResp) ProtoReflect() protoreflect.Message
func (*RequestLicenseResp) Reset ¶
func (x *RequestLicenseResp) Reset()
func (*RequestLicenseResp) String ¶
func (x *RequestLicenseResp) String() string
type UnimplementedLicenseServer ¶
type UnimplementedLicenseServer struct { }
UnimplementedLicenseServer can be embedded to have forward compatible implementations.
func (*UnimplementedLicenseServer) ApplyLicense ¶
func (*UnimplementedLicenseServer) ApplyLicense(context.Context, *ApplyLicenseReq) (*ApplyLicenseResp, error)
func (*UnimplementedLicenseServer) GetStatus ¶
func (*UnimplementedLicenseServer) GetStatus(context.Context, *GetStatusReq) (*GetStatusResp, error)
func (*UnimplementedLicenseServer) RequestLicense ¶
func (*UnimplementedLicenseServer) RequestLicense(context.Context, *RequestLicenseReq) (*RequestLicenseResp, error)