Documentation ¶
Index ¶
- Variables
- type APIError
- type APIKey
- type APIKeyResponse
- type Client
- func (c *Client) DeleteAPIKey(ctx context.Context, apiKey string) error
- func (c *Client) GetAPIKey(ctx context.Context, apiKey string) (APIKeyResponse, error)
- func (c *Client) GetUser(ctx context.Context, email string) (UserResponse, error)
- func (c *Client) SetProjectLimits(ctx context.Context, projectID string, limits url.Values) error
- func (c *Client) ViolationFreezeAccount(ctx context.Context, email string) error
- type Project
- type User
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
var ( // Error is a class of satellite admin client errors. Error = errs.Class("satellite admin client") // ErrNotFound is an error returned when the resource did not exist. ErrNotFound = Error.New("not found") )
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { Status string Message string `json:"message"` Detail string `json:"detail"` }
APIError is a satellite admin API error.
type APIKey ¶
type APIKey struct { ID uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` }
APIKey is a satellite api key.
type APIKeyResponse ¶
type APIKeyResponse struct { APIKey APIKey `json:"api_key,omitempty"` Project Project `json:"project,omitempty"` Owner User `json:"owner,omitempty"` }
APIKeyResponse is a response when looking up API key information from the satellite.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a satellite admin client.
func (*Client) DeleteAPIKey ¶
DeleteAPIKey deletes the given API key from the satellite. See https://github.com/storj/storj/tree/main/satellite/admin#delete-apiapikeysapikey
func (*Client) GetAPIKey ¶
GetAPIKey gets information on the given API key from the satellite. See https://github.com/storj/storj/tree/main/satellite/admin#get-apiapikeysapikey
func (*Client) GetUser ¶
GetUser gets given user information from the satellite. See https://github.com/storj/storj/tree/main/satellite/admin#get-apiusersuser-email
func (*Client) SetProjectLimits ¶
SetProjectLimits sets the project limits. See https://github.com/storj/storj/tree/main/satellite/admin#update-limits
func (*Client) ViolationFreezeAccount ¶
ViolationFreezeAccount freezes the given user's account on the satellite so no upload or downloads may occur. See https://github.com/storj/storj/tree/main/satellite/admin#put-apiusersuser-emailviolation-freeze
type User ¶
type User struct { ID uuid.UUID `json:"id,omitempty"` FullName string `json:"fullName,omitempty"` Email string `json:"email,omitempty"` PaidTier bool `json:"paidTier,omitempty"` }
User is a satellite user.
type UserResponse ¶
type UserResponse struct { User User `json:"user,omitempty"` Projects []Project `json:"projects,omitempty"` }
UserResponse is a response when looking up a user information from the satellite.