Documentation
¶
Overview ¶
Code generated generate_clients.go. DO NOT EDIT.
Index ¶
- Constants
- func IgnoreUnexported() cmp.Option
- type Apimvmv1
- type Apiv1
- type Client
- type ClientCall
- type DialConfig
- type PersistTokenFn
- type TestClientInterceptor
- func (t *TestClientInterceptor) WrapStreamingClient(connect.StreamingClientFunc) connect.StreamingClientFunc
- func (t *TestClientInterceptor) WrapStreamingHandler(connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (t *TestClientInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type TokenRenewal
Constants ¶
View Source
const ( TokenEnvName = "FCO_APIV1_TOKEN" TokenFileEnvName = "FCO_APIV1_TOKEN_FILE" BaseURLEnvName = "FCO_APIV1_URL" )
Variables ¶
This section is empty.
Functions ¶
func IgnoreUnexported ¶
Types ¶
type Apimvmv1 ¶
type Apimvmv1 interface {
Location() mvmv1connect.LocationServiceClient
MVM() mvmv1connect.MVMServiceClient
OS() mvmv1connect.OSServiceClient
VLAN() mvmv1connect.VLANServiceClient
}
type Apiv1 ¶
type Apiv1 interface {
Health() apiv1connect.HealthServiceClient
IP() apiv1connect.IPServiceClient
Method() apiv1connect.MethodServiceClient
Project() apiv1connect.ProjectServiceClient
Tenant() apiv1connect.TenantServiceClient
Token() apiv1connect.TokenServiceClient
Version() apiv1connect.VersionServiceClient
}
type ClientCall ¶
type DialConfig ¶
type DialConfig struct {
// BaseUrl points to the apiv1 url where the apiserver is reachable
BaseURL string
// Token to be used to talk to the apiserver, the string representation of the token.
// If Token is specified, TokenFile cannot be specified.
// It is possible to renew this token automatically, see TokenRenewal.
Token string
// Tokenfile path to a file containing the string representation of the token.
// If Tokenfile is specified, Token cannot be specified.
// Token renewal must be done from outside
TokenFile string
// Duration between token file re-reads, optional, defaults to 5min if not specified.
TokenFileRereadDuration time.Duration
// Optional client Interceptors
Interceptors []connect.Interceptor
UserAgent string
// TokenRenewal defines if and how the token should be renewed
TokenRenewal *TokenRenewal
// Transport optional, can be used to configure how the http transport works.
Transport http.RoundTripper
Log *slog.Logger
// contains filtered or unexported fields
}
DialConfig is the configuration to create a api-server connection
func (*DialConfig) HttpClient ¶
func (d *DialConfig) HttpClient() *http.Client
type PersistTokenFn ¶
func NewFilesystemTokenPersister ¶
func NewFilesystemTokenPersister(tokenFile string) (PersistTokenFn, error)
type TestClientInterceptor ¶
type TestClientInterceptor struct {
// contains filtered or unexported fields
}
func NewTestInterceptor ¶
func NewTestInterceptor(t *testing.T, calls []ClientCall) *TestClientInterceptor
func (*TestClientInterceptor) WrapStreamingClient ¶
func (t *TestClientInterceptor) WrapStreamingClient(connect.StreamingClientFunc) connect.StreamingClientFunc
func (*TestClientInterceptor) WrapStreamingHandler ¶
func (t *TestClientInterceptor) WrapStreamingHandler(connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type TokenRenewal ¶
type TokenRenewal struct {
// PersistTokenFn is called to persist the newly fetched token
// token will not be persisted if not specified
PersistTokenFn PersistTokenFn
}
Click to show internal directories.
Click to hide internal directories.