Documentation
¶
Overview ¶
Package license is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- 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 RegisterLicenseServer(s *grpc.Server, srv LicenseServer)
- type ApplyLicenseReq
- func (*ApplyLicenseReq) Descriptor() ([]byte, []int)
- func (m *ApplyLicenseReq) GetLicense() string
- func (*ApplyLicenseReq) ProtoMessage()
- func (m *ApplyLicenseReq) Reset()
- func (m *ApplyLicenseReq) String() string
- func (m *ApplyLicenseReq) XXX_DiscardUnknown()
- func (m *ApplyLicenseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ApplyLicenseReq) XXX_Merge(src proto.Message)
- func (m *ApplyLicenseReq) XXX_Size() int
- func (m *ApplyLicenseReq) XXX_Unmarshal(b []byte) error
- type ApplyLicenseResp
- func (*ApplyLicenseResp) Descriptor() ([]byte, []int)
- func (m *ApplyLicenseResp) GetStatus() *GetStatusResp
- func (*ApplyLicenseResp) ProtoMessage()
- func (m *ApplyLicenseResp) Reset()
- func (m *ApplyLicenseResp) String() string
- func (m *ApplyLicenseResp) XXX_DiscardUnknown()
- func (m *ApplyLicenseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ApplyLicenseResp) XXX_Merge(src proto.Message)
- func (m *ApplyLicenseResp) XXX_Size() int
- func (m *ApplyLicenseResp) XXX_Unmarshal(b []byte) error
- type GetStatusReq
- func (*GetStatusReq) Descriptor() ([]byte, []int)
- func (*GetStatusReq) ProtoMessage()
- func (m *GetStatusReq) Reset()
- func (m *GetStatusReq) String() string
- func (m *GetStatusReq) XXX_DiscardUnknown()
- func (m *GetStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetStatusReq) XXX_Merge(src proto.Message)
- func (m *GetStatusReq) XXX_Size() int
- func (m *GetStatusReq) XXX_Unmarshal(b []byte) error
- type GetStatusResp
- func (*GetStatusResp) Descriptor() ([]byte, []int)
- func (m *GetStatusResp) GetConfiguredAt() *timestamp.Timestamp
- func (m *GetStatusResp) GetCustomerName() string
- func (m *GetStatusResp) GetLicenseId() string
- func (m *GetStatusResp) GetLicensedPeriod() *GetStatusResp_DateRange
- func (*GetStatusResp) ProtoMessage()
- func (m *GetStatusResp) Reset()
- func (m *GetStatusResp) String() string
- func (m *GetStatusResp) XXX_DiscardUnknown()
- func (m *GetStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetStatusResp) XXX_Merge(src proto.Message)
- func (m *GetStatusResp) XXX_Size() int
- func (m *GetStatusResp) XXX_Unmarshal(b []byte) error
- type GetStatusResp_DateRange
- func (*GetStatusResp_DateRange) Descriptor() ([]byte, []int)
- func (m *GetStatusResp_DateRange) GetEnd() *timestamp.Timestamp
- func (m *GetStatusResp_DateRange) GetStart() *timestamp.Timestamp
- func (*GetStatusResp_DateRange) ProtoMessage()
- func (m *GetStatusResp_DateRange) Reset()
- func (m *GetStatusResp_DateRange) String() string
- func (m *GetStatusResp_DateRange) XXX_DiscardUnknown()
- func (m *GetStatusResp_DateRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetStatusResp_DateRange) XXX_Merge(src proto.Message)
- func (m *GetStatusResp_DateRange) XXX_Size() int
- func (m *GetStatusResp_DateRange) XXX_Unmarshal(b []byte) error
- 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)
- func (m *RequestLicenseReq) GetEmail() string
- func (m *RequestLicenseReq) GetFirstName() string
- func (m *RequestLicenseReq) GetGdprAgree() bool
- func (m *RequestLicenseReq) GetLastName() string
- func (*RequestLicenseReq) ProtoMessage()
- func (m *RequestLicenseReq) Reset()
- func (m *RequestLicenseReq) String() string
- func (m *RequestLicenseReq) XXX_DiscardUnknown()
- func (m *RequestLicenseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RequestLicenseReq) XXX_Merge(src proto.Message)
- func (m *RequestLicenseReq) XXX_Size() int
- func (m *RequestLicenseReq) XXX_Unmarshal(b []byte) error
- type RequestLicenseResp
- func (*RequestLicenseResp) Descriptor() ([]byte, []int)
- func (m *RequestLicenseResp) GetLicense() stringdeprecated
- func (m *RequestLicenseResp) GetStatus() *GetStatusResp
- func (*RequestLicenseResp) ProtoMessage()
- func (m *RequestLicenseResp) Reset()
- func (m *RequestLicenseResp) String() string
- func (m *RequestLicenseResp) XXX_DiscardUnknown()
- func (m *RequestLicenseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RequestLicenseResp) XXX_Merge(src proto.Message)
- func (m *RequestLicenseResp) XXX_Size() int
- func (m *RequestLicenseResp) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ApplyLicenseReq) Descriptor ¶
func (*ApplyLicenseReq) Descriptor() ([]byte, []int)
func (*ApplyLicenseReq) GetLicense ¶
func (m *ApplyLicenseReq) GetLicense() string
func (*ApplyLicenseReq) ProtoMessage ¶
func (*ApplyLicenseReq) ProtoMessage()
func (*ApplyLicenseReq) Reset ¶
func (m *ApplyLicenseReq) Reset()
func (*ApplyLicenseReq) String ¶
func (m *ApplyLicenseReq) String() string
func (*ApplyLicenseReq) XXX_DiscardUnknown ¶
func (m *ApplyLicenseReq) XXX_DiscardUnknown()
func (*ApplyLicenseReq) XXX_Marshal ¶
func (m *ApplyLicenseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyLicenseReq) XXX_Merge ¶
func (dst *ApplyLicenseReq) XXX_Merge(src proto.Message)
func (*ApplyLicenseReq) XXX_Size ¶
func (m *ApplyLicenseReq) XXX_Size() int
func (*ApplyLicenseReq) XXX_Unmarshal ¶
func (m *ApplyLicenseReq) XXX_Unmarshal(b []byte) error
type ApplyLicenseResp ¶
type ApplyLicenseResp struct { Status *GetStatusResp `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ApplyLicenseResp) Descriptor ¶
func (*ApplyLicenseResp) Descriptor() ([]byte, []int)
func (*ApplyLicenseResp) GetStatus ¶
func (m *ApplyLicenseResp) GetStatus() *GetStatusResp
func (*ApplyLicenseResp) ProtoMessage ¶
func (*ApplyLicenseResp) ProtoMessage()
func (*ApplyLicenseResp) Reset ¶
func (m *ApplyLicenseResp) Reset()
func (*ApplyLicenseResp) String ¶
func (m *ApplyLicenseResp) String() string
func (*ApplyLicenseResp) XXX_DiscardUnknown ¶
func (m *ApplyLicenseResp) XXX_DiscardUnknown()
func (*ApplyLicenseResp) XXX_Marshal ¶
func (m *ApplyLicenseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyLicenseResp) XXX_Merge ¶
func (dst *ApplyLicenseResp) XXX_Merge(src proto.Message)
func (*ApplyLicenseResp) XXX_Size ¶
func (m *ApplyLicenseResp) XXX_Size() int
func (*ApplyLicenseResp) XXX_Unmarshal ¶
func (m *ApplyLicenseResp) XXX_Unmarshal(b []byte) error
type GetStatusReq ¶
type GetStatusReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetStatusReq) Descriptor ¶
func (*GetStatusReq) Descriptor() ([]byte, []int)
func (*GetStatusReq) ProtoMessage ¶
func (*GetStatusReq) ProtoMessage()
func (*GetStatusReq) Reset ¶
func (m *GetStatusReq) Reset()
func (*GetStatusReq) String ¶
func (m *GetStatusReq) String() string
func (*GetStatusReq) XXX_DiscardUnknown ¶
func (m *GetStatusReq) XXX_DiscardUnknown()
func (*GetStatusReq) XXX_Marshal ¶
func (m *GetStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStatusReq) XXX_Merge ¶
func (dst *GetStatusReq) XXX_Merge(src proto.Message)
func (*GetStatusReq) XXX_Size ¶
func (m *GetStatusReq) XXX_Size() int
func (*GetStatusReq) XXX_Unmarshal ¶
func (m *GetStatusReq) XXX_Unmarshal(b []byte) error
type GetStatusResp ¶
type GetStatusResp struct { LicenseId string `protobuf:"bytes,1,opt,name=license_id,json=licenseId,proto3" json:"license_id,omitempty"` ConfiguredAt *timestamp.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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetStatusResp) Descriptor ¶
func (*GetStatusResp) Descriptor() ([]byte, []int)
func (*GetStatusResp) GetConfiguredAt ¶
func (m *GetStatusResp) GetConfiguredAt() *timestamp.Timestamp
func (*GetStatusResp) GetCustomerName ¶
func (m *GetStatusResp) GetCustomerName() string
func (*GetStatusResp) GetLicenseId ¶
func (m *GetStatusResp) GetLicenseId() string
func (*GetStatusResp) GetLicensedPeriod ¶
func (m *GetStatusResp) GetLicensedPeriod() *GetStatusResp_DateRange
func (*GetStatusResp) ProtoMessage ¶
func (*GetStatusResp) ProtoMessage()
func (*GetStatusResp) Reset ¶
func (m *GetStatusResp) Reset()
func (*GetStatusResp) String ¶
func (m *GetStatusResp) String() string
func (*GetStatusResp) XXX_DiscardUnknown ¶
func (m *GetStatusResp) XXX_DiscardUnknown()
func (*GetStatusResp) XXX_Marshal ¶
func (m *GetStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStatusResp) XXX_Merge ¶
func (dst *GetStatusResp) XXX_Merge(src proto.Message)
func (*GetStatusResp) XXX_Size ¶
func (m *GetStatusResp) XXX_Size() int
func (*GetStatusResp) XXX_Unmarshal ¶
func (m *GetStatusResp) XXX_Unmarshal(b []byte) error
type GetStatusResp_DateRange ¶
type GetStatusResp_DateRange struct { Start *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` End *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetStatusResp_DateRange) Descriptor ¶
func (*GetStatusResp_DateRange) Descriptor() ([]byte, []int)
func (*GetStatusResp_DateRange) GetEnd ¶
func (m *GetStatusResp_DateRange) GetEnd() *timestamp.Timestamp
func (*GetStatusResp_DateRange) GetStart ¶
func (m *GetStatusResp_DateRange) GetStart() *timestamp.Timestamp
func (*GetStatusResp_DateRange) ProtoMessage ¶
func (*GetStatusResp_DateRange) ProtoMessage()
func (*GetStatusResp_DateRange) Reset ¶
func (m *GetStatusResp_DateRange) Reset()
func (*GetStatusResp_DateRange) String ¶
func (m *GetStatusResp_DateRange) String() string
func (*GetStatusResp_DateRange) XXX_DiscardUnknown ¶
func (m *GetStatusResp_DateRange) XXX_DiscardUnknown()
func (*GetStatusResp_DateRange) XXX_Marshal ¶
func (m *GetStatusResp_DateRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStatusResp_DateRange) XXX_Merge ¶
func (dst *GetStatusResp_DateRange) XXX_Merge(src proto.Message)
func (*GetStatusResp_DateRange) XXX_Size ¶
func (m *GetStatusResp_DateRange) XXX_Size() int
func (*GetStatusResp_DateRange) XXX_Unmarshal ¶
func (m *GetStatusResp_DateRange) XXX_Unmarshal(b []byte) error
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.ClientConn) 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RequestLicenseReq) Descriptor ¶
func (*RequestLicenseReq) Descriptor() ([]byte, []int)
func (*RequestLicenseReq) GetEmail ¶
func (m *RequestLicenseReq) GetEmail() string
func (*RequestLicenseReq) GetFirstName ¶
func (m *RequestLicenseReq) GetFirstName() string
func (*RequestLicenseReq) GetGdprAgree ¶
func (m *RequestLicenseReq) GetGdprAgree() bool
func (*RequestLicenseReq) GetLastName ¶
func (m *RequestLicenseReq) GetLastName() string
func (*RequestLicenseReq) ProtoMessage ¶
func (*RequestLicenseReq) ProtoMessage()
func (*RequestLicenseReq) Reset ¶
func (m *RequestLicenseReq) Reset()
func (*RequestLicenseReq) String ¶
func (m *RequestLicenseReq) String() string
func (*RequestLicenseReq) XXX_DiscardUnknown ¶
func (m *RequestLicenseReq) XXX_DiscardUnknown()
func (*RequestLicenseReq) XXX_Marshal ¶
func (m *RequestLicenseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestLicenseReq) XXX_Merge ¶
func (dst *RequestLicenseReq) XXX_Merge(src proto.Message)
func (*RequestLicenseReq) XXX_Size ¶
func (m *RequestLicenseReq) XXX_Size() int
func (*RequestLicenseReq) XXX_Unmarshal ¶
func (m *RequestLicenseReq) XXX_Unmarshal(b []byte) error
type RequestLicenseResp ¶
type RequestLicenseResp struct { License string `protobuf:"bytes,1,opt,name=license,proto3" json:"license,omitempty"` // Deprecated: Do not use. Status *GetStatusResp `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RequestLicenseResp) Descriptor ¶
func (*RequestLicenseResp) Descriptor() ([]byte, []int)
func (*RequestLicenseResp) GetLicense
deprecated
func (m *RequestLicenseResp) GetLicense() string
Deprecated: Do not use.
func (*RequestLicenseResp) GetStatus ¶
func (m *RequestLicenseResp) GetStatus() *GetStatusResp
func (*RequestLicenseResp) ProtoMessage ¶
func (*RequestLicenseResp) ProtoMessage()
func (*RequestLicenseResp) Reset ¶
func (m *RequestLicenseResp) Reset()
func (*RequestLicenseResp) String ¶
func (m *RequestLicenseResp) String() string
func (*RequestLicenseResp) XXX_DiscardUnknown ¶
func (m *RequestLicenseResp) XXX_DiscardUnknown()
func (*RequestLicenseResp) XXX_Marshal ¶
func (m *RequestLicenseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestLicenseResp) XXX_Merge ¶
func (dst *RequestLicenseResp) XXX_Merge(src proto.Message)
func (*RequestLicenseResp) XXX_Size ¶
func (m *RequestLicenseResp) XXX_Size() int
func (*RequestLicenseResp) XXX_Unmarshal ¶
func (m *RequestLicenseResp) XXX_Unmarshal(b []byte) error