license

package
v0.0.0-...-837eb61 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package license is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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.

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"`
	// 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) GetLicenseId

func (x *GetStatusResp) GetLicenseId() 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 (*GetStatusResp_DateRange) GetStart

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 (*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: Do not use.
	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: Do not use.

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) GetStatus

func (*UnimplementedLicenseServer) RequestLicense

Jump to

Keyboard shortcuts

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