Documentation
¶
Index ¶
- type Config
- type ConfigOutput
- type IProxy
- type ITailer
- type RPCService
- func (srv *RPCService) EventsResend(ctx context.Context, req *rpc.EventsResendRequest) (*rpc.EventsResendResponse, error)
- func (srv *RPCService) Listen(req *rpc.ListenRequest, stream rpc.StripeCLI_ListenServer) error
- func (srv *RPCService) Login(ctx context.Context, req *rpc.LoginRequest) (*rpc.LoginResponse, error)
- func (srv *RPCService) LoginStatus(ctx context.Context, req *rpc.LoginStatusRequest) (*rpc.LoginStatusResponse, error)
- func (srv *RPCService) LogsTail(req *rpc.LogsTailRequest, stream rpc.StripeCLI_LogsTailServer) error
- func (srv *RPCService) Run(ctx context.Context)
- func (srv *RPCService) SampleConfigs(ctx context.Context, req *rpc.SampleConfigsRequest) (*rpc.SampleConfigsResponse, error)
- func (srv *RPCService) SampleCreate(ctx context.Context, req *rpc.SampleCreateRequest) (*rpc.SampleCreateResponse, error)
- func (srv *RPCService) SamplesList(ctx context.Context, req *rpc.SamplesListRequest) (*rpc.SamplesListResponse, error)
- func (srv *RPCService) Trigger(ctx context.Context, req *rpc.TriggerRequest) (*rpc.TriggerResponse, error)
- func (srv *RPCService) TriggersList(ctx context.Context, req *rpc.TriggersListRequest) (*rpc.TriggersListResponse, error)
- func (srv *RPCService) Version(ctx context.Context, req *rpc.VersionRequest) (*rpc.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Port is the port number to listen to on localhost
Port int
// Info, error, etc. logger. Unrelated to API request logs.
Log *log.Logger
// UserCfg is the Stripe CLI config of the user
UserCfg *config.Config
}
Config provides the configuration for the RPC service.
type ConfigOutput ¶
type ConfigOutput struct {
// Host is the IP address of the gRPC server
Host string `json:"host"`
// Port is port number of the gRPC server
Port int `json:"port"`
}
ConfigOutput is the config that clients will need to connect to the gRPC server. This is printed out for clients to parse.
type RPCService ¶
type RPCService struct {
// contains filtered or unexported fields
}
RPCService implements the gRPC interface and starts the gRPC server.
func (*RPCService) EventsResend ¶
func (srv *RPCService) EventsResend(ctx context.Context, req *rpc.EventsResendRequest) (*rpc.EventsResendResponse, error)
EventsResend resends an event given an event ID
func (*RPCService) Listen ¶
func (srv *RPCService) Listen(req *rpc.ListenRequest, stream rpc.StripeCLI_ListenServer) error
Listen returns a stream of webhook events and forwards them to a local endpoint
func (*RPCService) Login ¶
func (srv *RPCService) Login(ctx context.Context, req *rpc.LoginRequest) (*rpc.LoginResponse, error)
Login returns a URL and pairing code to complete the login for the Stripe CLI
func (*RPCService) LoginStatus ¶
func (srv *RPCService) LoginStatus(ctx context.Context, req *rpc.LoginStatusRequest) (*rpc.LoginStatusResponse, error)
LoginStatus returns when login is successful, or returns an error if failure or timeout.
func (*RPCService) LogsTail ¶
func (srv *RPCService) LogsTail(req *rpc.LogsTailRequest, stream rpc.StripeCLI_LogsTailServer) error
LogsTail returns a stream of API logs
func (*RPCService) Run ¶
func (srv *RPCService) Run(ctx context.Context)
Run starts a gRPC server on localhost
func (*RPCService) SampleConfigs ¶
func (srv *RPCService) SampleConfigs(ctx context.Context, req *rpc.SampleConfigsRequest) (*rpc.SampleConfigsResponse, error)
SampleConfigs returns a list of available configs for a given Stripe sample.
func (*RPCService) SampleCreate ¶
func (srv *RPCService) SampleCreate(ctx context.Context, req *rpc.SampleCreateRequest) (*rpc.SampleCreateResponse, error)
SampleCreate creates a sample at a given path with the selected integration, client language, and server language.
func (*RPCService) SamplesList ¶
func (srv *RPCService) SamplesList(ctx context.Context, req *rpc.SamplesListRequest) (*rpc.SamplesListResponse, error)
SamplesList returns a list of available Stripe samples
func (*RPCService) Trigger ¶
func (srv *RPCService) Trigger(ctx context.Context, req *rpc.TriggerRequest) (*rpc.TriggerResponse, error)
Trigger triggers a Stripe event.
func (*RPCService) TriggersList ¶
func (srv *RPCService) TriggersList(ctx context.Context, req *rpc.TriggersListRequest) (*rpc.TriggersListResponse, error)
TriggersList returns a list of available events for `Trigger`.
func (*RPCService) Version ¶
func (srv *RPCService) Version(ctx context.Context, req *rpc.VersionRequest) (*rpc.VersionResponse, error)
Version returns the version of the Stripe CLI