Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeStdio ¶
Types ¶
type Client ¶
type Client interface {
CreateUpload(context.Context, clicore.UploadCreateRequest) (clicore.UploadCreateResponse, error)
PutUpload(context.Context, clicore.PresignedUpload, io.Reader, int64) error
CompleteUpload(context.Context, string) (clicore.UploadCompleteResponse, error)
ExtendExpiry(context.Context, string, time.Duration) (clicore.Share, error)
Usage(context.Context) (clicore.UsageResponse, error)
}
type ClientFactory ¶
type ClientFactory func(clicore.Credential) Client
type CredentialLoader ¶
type CredentialLoader func() (clicore.Credential, error)
type HTTPCredentialResolver ¶
type HTTPCredentialResolver func(*http.Request) (clicore.Credential, error)
type Option ¶
type Option func(*Server)
func WithClientFactory ¶
func WithClientFactory(factory ClientFactory) Option
func WithCredentialLoader ¶
func WithCredentialLoader(loader CredentialLoader) Option
func WithDisabledTools ¶
func WithHTTPCredentialResolver ¶
func WithHTTPCredentialResolver(resolver HTTPCredentialResolver) Option
func WithPreviewBuilder ¶
func WithPreviewBuilder(builder PreviewBuilder) Option
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
type Tool ¶
type Tool struct {
Descriptor ToolDescriptor
Handler func(context.Context, json.RawMessage) (any, error)
}
Click to show internal directories.
Click to hide internal directories.