import sources

This commit is contained in:
Олег Бородин
2024-07-30 09:49:53 +02:00
commit e9d4d1ef07
51 changed files with 15484 additions and 0 deletions

27
pkg/client/auth.go Normal file
View File

@@ -0,0 +1,27 @@
package client
import (
"context"
)
type AuthCredential struct {
Payload map[string]string
}
func NewAuthCredential(username, password string) *AuthCredential {
payload := make(map[string]string)
payload["username"] = username
payload["password"] = password
return &AuthCredential{
Payload: payload,
}
}
func (cred *AuthCredential) GetRequestMetadata(ctx context.Context, data ...string) (map[string]string, error) {
var err error
return cred.Payload, err
}
func (cred *AuthCredential) RequireTransportSecurity() bool {
return false
}