Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package provider/v1 contains the API used to fetch currency information.
Index ¶
- Constants
- Variables
- func ForEachCurrency(ctx context.Context, ...) error
- func RegisterCurrencyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCurrencyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CurrencyServiceClient) error
- func RegisterCurrencyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCurrencyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CurrencyServiceServer) error
- func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceServer)
- type Currency
- func (*Currency) Descriptor() ([]byte, []int)
- func (m *Currency) GetId() string
- func (m *Currency) GetIso4217Code() string
- func (m *Currency) GetName() string
- func (m *Currency) GetSign() string
- func (m *Currency) Marshal() (dAtA []byte, err error)
- func (m *Currency) MarshalTo(dAtA []byte) (int, error)
- func (m *Currency) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Currency) ProtoMessage()
- func (m *Currency) Reset()
- func (m *Currency) Size() (n int)
- func (m *Currency) String() string
- func (m *Currency) Unmarshal(dAtA []byte) error
- func (m *Currency) XXX_DiscardUnknown()
- func (m *Currency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Currency) XXX_Merge(src proto.Message)
- func (m *Currency) XXX_Size() int
- func (m *Currency) XXX_Unmarshal(b []byte) error
- type CurrencyCallback
- type CurrencyList
- func (*CurrencyList) Descriptor() ([]byte, []int)
- func (m *CurrencyList) GetItems() []*Currency
- func (m *CurrencyList) Marshal() (dAtA []byte, err error)
- func (m *CurrencyList) MarshalTo(dAtA []byte) (int, error)
- func (m *CurrencyList) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CurrencyList) ProtoMessage()
- func (m *CurrencyList) Reset()
- func (m *CurrencyList) Size() (n int)
- func (m *CurrencyList) String() string
- func (m *CurrencyList) Unmarshal(dAtA []byte) error
- func (m *CurrencyList) XXX_DiscardUnknown()
- func (m *CurrencyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CurrencyList) XXX_Merge(src proto.Message)
- func (m *CurrencyList) XXX_Size() int
- func (m *CurrencyList) XXX_Unmarshal(b []byte) error
- type CurrencyServiceClient
- type CurrencyServiceServer
- type GetDefaultCurrencyRequest
- func (*GetDefaultCurrencyRequest) Descriptor() ([]byte, []int)
- func (m *GetDefaultCurrencyRequest) GetOrganizationId() string
- func (m *GetDefaultCurrencyRequest) Marshal() (dAtA []byte, err error)
- func (m *GetDefaultCurrencyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetDefaultCurrencyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetDefaultCurrencyRequest) ProtoMessage()
- func (m *GetDefaultCurrencyRequest) Reset()
- func (m *GetDefaultCurrencyRequest) Size() (n int)
- func (m *GetDefaultCurrencyRequest) String() string
- func (m *GetDefaultCurrencyRequest) Unmarshal(dAtA []byte) error
- func (m *GetDefaultCurrencyRequest) XXX_DiscardUnknown()
- func (m *GetDefaultCurrencyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetDefaultCurrencyRequest) XXX_Merge(src proto.Message)
- func (m *GetDefaultCurrencyRequest) XXX_Size() int
- func (m *GetDefaultCurrencyRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedCurrencyServiceServer
- func (*UnimplementedCurrencyServiceServer) GetAPIVersion(ctx context.Context, req *v1.Empty) (*v1.Version, error)
- func (*UnimplementedCurrencyServiceServer) GetCurrency(ctx context.Context, req *v1.IDOptions) (*Currency, error)
- func (*UnimplementedCurrencyServiceServer) GetDefaultCurrency(ctx context.Context, req *GetDefaultCurrencyRequest) (*Currency, error)
- func (*UnimplementedCurrencyServiceServer) ListCurrencies(ctx context.Context, req *v1.ListOptions) (*CurrencyList, error)
Constants ¶
const ( // APIID contains identifier of this API APIID = "currency/v1" // APIMajorVersion contains major version of this API APIMajorVersion = 1 // APIMinorVersion contains minor version of this API APIMinorVersion = 0 // APIPatchVersion contains patch version of this API APIPatchVersion = 0 )
Variables ¶
Functions ¶
func ForEachCurrency ¶
func ForEachCurrency(ctx context.Context, listFunc func(ctx context.Context, req *common.ListOptions) (*CurrencyList, error), opts *common.ListOptions, cb CurrencyCallback) error
ForEachCurrency iterates over all currencies, invoking the given callback for each IP currencies.
func RegisterCurrencyServiceHandler ¶
func RegisterCurrencyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCurrencyServiceHandler registers the http handlers for service CurrencyService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCurrencyServiceHandlerClient ¶
func RegisterCurrencyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CurrencyServiceClient) error
RegisterCurrencyServiceHandlerClient registers the http handlers for service CurrencyService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CurrencyServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CurrencyServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CurrencyServiceClient" to call the correct interceptors.
func RegisterCurrencyServiceHandlerFromEndpoint ¶
func RegisterCurrencyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCurrencyServiceHandlerFromEndpoint is same as RegisterCurrencyServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCurrencyServiceHandlerServer ¶
func RegisterCurrencyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CurrencyServiceServer) error
RegisterCurrencyServiceHandlerServer registers the http handlers for service CurrencyService to "mux". UnaryRPC :call CurrencyServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterCurrencyServiceServer ¶
func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceServer)
Types ¶
type Currency ¶
type Currency struct { // System identifier of the currency. // E.g. "eur" or "usd" Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Human readable name of the currency // E.g. "US Dollar" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Human readable sign for the currency. // E.g. "$" Sign string `protobuf:"bytes,3,opt,name=sign,proto3" json:"sign,omitempty"` // ISO 4217 currency code. // E.g. "USD" Iso4217Code string `protobuf:"bytes,4,opt,name=iso4217_code,json=iso4217Code,proto3" json:"iso4217_code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Currency represents a specific monetary currency.
func (*Currency) Descriptor ¶
func (*Currency) GetIso4217Code ¶
func (*Currency) MarshalToSizedBuffer ¶
func (*Currency) ProtoMessage ¶
func (*Currency) ProtoMessage()
func (*Currency) XXX_DiscardUnknown ¶
func (m *Currency) XXX_DiscardUnknown()
func (*Currency) XXX_Marshal ¶
func (*Currency) XXX_Unmarshal ¶
type CurrencyCallback ¶
CurrencyCallback is a callback for individual currencies.
type CurrencyList ¶
type CurrencyList struct { Items []*Currency `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
List of currencies.
func (*CurrencyList) Descriptor ¶
func (*CurrencyList) Descriptor() ([]byte, []int)
func (*CurrencyList) GetItems ¶
func (m *CurrencyList) GetItems() []*Currency
func (*CurrencyList) Marshal ¶
func (m *CurrencyList) Marshal() (dAtA []byte, err error)
func (*CurrencyList) MarshalToSizedBuffer ¶
func (m *CurrencyList) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CurrencyList) ProtoMessage ¶
func (*CurrencyList) ProtoMessage()
func (*CurrencyList) Reset ¶
func (m *CurrencyList) Reset()
func (*CurrencyList) Size ¶
func (m *CurrencyList) Size() (n int)
func (*CurrencyList) String ¶
func (m *CurrencyList) String() string
func (*CurrencyList) Unmarshal ¶
func (m *CurrencyList) Unmarshal(dAtA []byte) error
func (*CurrencyList) XXX_DiscardUnknown ¶
func (m *CurrencyList) XXX_DiscardUnknown()
func (*CurrencyList) XXX_Marshal ¶
func (m *CurrencyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CurrencyList) XXX_Merge ¶
func (m *CurrencyList) XXX_Merge(src proto.Message)
func (*CurrencyList) XXX_Size ¶
func (m *CurrencyList) XXX_Size() int
func (*CurrencyList) XXX_Unmarshal ¶
func (m *CurrencyList) XXX_Unmarshal(b []byte) error
type CurrencyServiceClient ¶
type CurrencyServiceClient interface { // Get the current API version of this service. // Required permissions: // - None GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error) // Fetch all providers that are supported by the ArangoDB cloud. // Required permissions: // - None ListCurrencies(ctx context.Context, in *v1.ListOptions, opts ...grpc.CallOption) (*CurrencyList, error) // Fetch a currency by its id. // Required permissions: // - None GetCurrency(ctx context.Context, in *v1.IDOptions, opts ...grpc.CallOption) (*Currency, error) // Fetch the default currency for a given (optional) organization. // Required permissions: // - resourcemanager.organization.get On the organization identified by given id. // - None In case no organization identifier was given. GetDefaultCurrency(ctx context.Context, in *GetDefaultCurrencyRequest, opts ...grpc.CallOption) (*Currency, error) }
CurrencyServiceClient is the client API for CurrencyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCurrencyServiceClient ¶
func NewCurrencyServiceClient(cc *grpc.ClientConn) CurrencyServiceClient
type CurrencyServiceServer ¶
type CurrencyServiceServer interface { // Get the current API version of this service. // Required permissions: // - None GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error) // Fetch all providers that are supported by the ArangoDB cloud. // Required permissions: // - None ListCurrencies(context.Context, *v1.ListOptions) (*CurrencyList, error) // Fetch a currency by its id. // Required permissions: // - None GetCurrency(context.Context, *v1.IDOptions) (*Currency, error) // Fetch the default currency for a given (optional) organization. // Required permissions: // - resourcemanager.organization.get On the organization identified by given id. // - None In case no organization identifier was given. GetDefaultCurrency(context.Context, *GetDefaultCurrencyRequest) (*Currency, error) }
CurrencyServiceServer is the server API for CurrencyService service.
type GetDefaultCurrencyRequest ¶
type GetDefaultCurrencyRequest struct { // Optional identifier for the organization to request the default // currency for. OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request arguments for GetDefaultCurrency.
func (*GetDefaultCurrencyRequest) Descriptor ¶
func (*GetDefaultCurrencyRequest) Descriptor() ([]byte, []int)
func (*GetDefaultCurrencyRequest) GetOrganizationId ¶
func (m *GetDefaultCurrencyRequest) GetOrganizationId() string
func (*GetDefaultCurrencyRequest) Marshal ¶
func (m *GetDefaultCurrencyRequest) Marshal() (dAtA []byte, err error)
func (*GetDefaultCurrencyRequest) MarshalTo ¶
func (m *GetDefaultCurrencyRequest) MarshalTo(dAtA []byte) (int, error)
func (*GetDefaultCurrencyRequest) MarshalToSizedBuffer ¶
func (m *GetDefaultCurrencyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetDefaultCurrencyRequest) ProtoMessage ¶
func (*GetDefaultCurrencyRequest) ProtoMessage()
func (*GetDefaultCurrencyRequest) Reset ¶
func (m *GetDefaultCurrencyRequest) Reset()
func (*GetDefaultCurrencyRequest) Size ¶
func (m *GetDefaultCurrencyRequest) Size() (n int)
func (*GetDefaultCurrencyRequest) String ¶
func (m *GetDefaultCurrencyRequest) String() string
func (*GetDefaultCurrencyRequest) Unmarshal ¶
func (m *GetDefaultCurrencyRequest) Unmarshal(dAtA []byte) error
func (*GetDefaultCurrencyRequest) XXX_DiscardUnknown ¶
func (m *GetDefaultCurrencyRequest) XXX_DiscardUnknown()
func (*GetDefaultCurrencyRequest) XXX_Marshal ¶
func (m *GetDefaultCurrencyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetDefaultCurrencyRequest) XXX_Merge ¶
func (m *GetDefaultCurrencyRequest) XXX_Merge(src proto.Message)
func (*GetDefaultCurrencyRequest) XXX_Size ¶
func (m *GetDefaultCurrencyRequest) XXX_Size() int
func (*GetDefaultCurrencyRequest) XXX_Unmarshal ¶
func (m *GetDefaultCurrencyRequest) XXX_Unmarshal(b []byte) error
type UnimplementedCurrencyServiceServer ¶
type UnimplementedCurrencyServiceServer struct { }
UnimplementedCurrencyServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedCurrencyServiceServer) GetAPIVersion ¶
func (*UnimplementedCurrencyServiceServer) GetCurrency ¶
func (*UnimplementedCurrencyServiceServer) GetDefaultCurrency ¶
func (*UnimplementedCurrencyServiceServer) GetDefaultCurrency(ctx context.Context, req *GetDefaultCurrencyRequest) (*Currency, error)
func (*UnimplementedCurrencyServiceServer) ListCurrencies ¶
func (*UnimplementedCurrencyServiceServer) ListCurrencies(ctx context.Context, req *v1.ListOptions) (*CurrencyList, error)