http

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package http implements the MinIO Admin API v3 compatibility layer (prefix /minio/admin/v3/).

This package is NOT related to the MinIO data importer in minio/import/. Its sole purpose is to expose a subset of the MinIO Admin API so that standard MinIO clients (mc, madmin-go) can manage DirIO's IAM objects — users, groups, policies, and service accounts — without any client-side changes.

The handlers delegate entirely to the DirIO service layer via service.ServicesFactory; there is no MinIO code in this path.

Relationship to other packages:

  • minio/import — one-time data importer from legacy MinIO installations
  • minio/middleware — detects MinIO SDK User-Agent and injects compat headers
  • internal/http/server/dirioapi — DirIO-native REST API (/.dirio/api/v1/)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(r *teapot.Router, h RouteHandlers)

RegisterRouter registers all MinIO Admin API v3 routes on r. When h is nil, routes are registered with nil handlers (for CLI route listing).

Types

type CannedPolicyHandlers

type CannedPolicyHandlers interface {
	HandleListCannedPolicies() http.Handler
	HandleAddCannedPolicy() http.Handler
	HandleRemoveCannedPolicy() http.Handler
	HandleCannedPolicyInfo() http.Handler
}

type GroupHTTPService

type GroupHTTPService struct {
	// contains filtered or unexported fields
}

func (*GroupHTTPService) GetGroupInfo

func (s *GroupHTTPService) GetGroupInfo(w nethttp.ResponseWriter, r *nethttp.Request)

GetGroupInfo handles GET /minio/admin/v3/group?name=... Returns group info including members (as access keys) and attached policies.

func (*GroupHTTPService) ListGroups

func (s *GroupHTTPService) ListGroups(w nethttp.ResponseWriter, r *nethttp.Request)

ListGroups handles GET /minio/admin/v3/groups Returns a JSON array of group names.

func (*GroupHTTPService) SetGroupStatus

func (s *GroupHTTPService) SetGroupStatus(w nethttp.ResponseWriter, r *nethttp.Request)

SetGroupStatus handles POST /minio/admin/v3/set-group-status?group=...&status=enabled|disabled

func (*GroupHTTPService) UpdateGroupMembers

func (s *GroupHTTPService) UpdateGroupMembers(w nethttp.ResponseWriter, r *nethttp.Request)

UpdateGroupMembers handles POST /minio/admin/v3/update-group-members Body JSON: {"group":"...", "members":["alice","bob"], "isRemove":false} Members are access key strings; they are resolved to UUIDs internally. When isRemove=false: creates group if not exists, adds members. When isRemove=true: removes members from group.

type GroupHandlers

type GroupHandlers interface {
	HandleUpdateGroupMembers() http.Handler
	HandleListGroups() http.Handler
	HandleGroupInfo() http.Handler
	HandleSetGroupStatus() http.Handler
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handles MinIO Admin API v3 IAM requests

func New

func New(serviceFactory *service.ServicesFactory) *Handler

func (*Handler) HandleAddCannedPolicy

func (h *Handler) HandleAddCannedPolicy() http.Handler

func (*Handler) HandleAddServiceAccount

func (h *Handler) HandleAddServiceAccount() http.Handler

func (*Handler) HandleAddUser

func (h *Handler) HandleAddUser() http.Handler

func (*Handler) HandleCannedPolicyInfo

func (h *Handler) HandleCannedPolicyInfo() http.Handler

func (*Handler) HandleDeleteServiceAccount

func (h *Handler) HandleDeleteServiceAccount() http.Handler

func (*Handler) HandleGroupInfo

func (h *Handler) HandleGroupInfo() http.Handler

func (*Handler) HandleHealth

func (h *Handler) HandleHealth() http.Handler

func (*Handler) HandleInfo

func (h *Handler) HandleInfo() http.Handler

func (*Handler) HandleListCannedPolicies

func (h *Handler) HandleListCannedPolicies() http.Handler

func (*Handler) HandleListGroups

func (h *Handler) HandleListGroups() http.Handler

func (*Handler) HandleListServiceAccounts

func (h *Handler) HandleListServiceAccounts() http.Handler

func (*Handler) HandleListUsers

func (h *Handler) HandleListUsers() http.Handler

func (*Handler) HandleRemoveCannedPolicy

func (h *Handler) HandleRemoveCannedPolicy() http.Handler

func (*Handler) HandleRemoveUser

func (h *Handler) HandleRemoveUser() http.Handler

func (*Handler) HandleServiceAccountInfo

func (h *Handler) HandleServiceAccountInfo() http.Handler

func (*Handler) HandleSetGroupStatus

func (h *Handler) HandleSetGroupStatus() http.Handler

func (*Handler) HandleSetPolicy

func (h *Handler) HandleSetPolicy() http.Handler

func (*Handler) HandleSetUserStatus

func (h *Handler) HandleSetUserStatus() http.Handler

func (*Handler) HandleUpdateGroupMembers

func (h *Handler) HandleUpdateGroupMembers() http.Handler

func (*Handler) HandleUpdateServiceAccount

func (h *Handler) HandleUpdateServiceAccount() http.Handler

func (*Handler) HandleUserInfo

func (h *Handler) HandleUserInfo() http.Handler

func (*Handler) HandlerDetachPolicy

func (h *Handler) HandlerDetachPolicy() http.Handler

func (*Handler) HandlerListPolicyEntities

func (h *Handler) HandlerListPolicyEntities() http.Handler

type HealthHandlers

type HealthHandlers interface {
	HandleInfo() http.Handler
	HandleHealth() http.Handler
}

type PolicyHTTPService

type PolicyHTTPService struct {
	// contains filtered or unexported fields
}

func (PolicyHTTPService) AddCannedPolicy

func (s PolicyHTTPService) AddCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) DetachPolicy

func (s PolicyHTTPService) DetachPolicy(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) InfoCannedPolicy

func (s PolicyHTTPService) InfoCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) ListCannedPolicies

func (s PolicyHTTPService) ListCannedPolicies(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) PolicyEntitiesList

func (s PolicyHTTPService) PolicyEntitiesList(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) RemoveCannedPolicy

func (s PolicyHTTPService) RemoveCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)

func (PolicyHTTPService) SetPolicy

type PolicyHandlers

type PolicyHandlers interface {
	HandlerListPolicyEntities() http.Handler
	HandleSetPolicy() http.Handler
	HandlerDetachPolicy() http.Handler
}

type ServiceAccountHTTPService

type ServiceAccountHTTPService struct {
	// contains filtered or unexported fields
}

func (*ServiceAccountHTTPService) AddServiceAccount

func (s *ServiceAccountHTTPService) AddServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)

AddServiceAccount handles PUT /minio/admin/v3/add-service-account Request body: madmin-encrypted AddServiceAccountReq JSON. Response: madmin-encrypted {"credentials": {"accessKey":"...","secretKey":"...",...}}

func (*ServiceAccountHTTPService) DeleteServiceAccount

func (s *ServiceAccountHTTPService) DeleteServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)

DeleteServiceAccount handles DELETE /minio/admin/v3/delete-service-account?accessKey=...

func (*ServiceAccountHTTPService) InfoServiceAccount

func (s *ServiceAccountHTTPService) InfoServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)

InfoServiceAccount handles GET /minio/admin/v3/info-service-account?accessKey=... madmin expects an encrypted InfoServiceAccountResp.

func (*ServiceAccountHTTPService) ListServiceAccounts

func (s *ServiceAccountHTTPService) ListServiceAccounts(w nethttp.ResponseWriter, r *nethttp.Request)

ListServiceAccounts handles GET /minio/admin/v3/list-service-accounts madmin expects an encrypted response containing {"accounts": [ServiceAccountInfo, ...]}

func (*ServiceAccountHTTPService) UpdateServiceAccount

func (s *ServiceAccountHTTPService) UpdateServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)

UpdateServiceAccount handles POST /minio/admin/v3/update-service-account?accessKey=... Body is madmin-encrypted UpdateServiceAccountReq JSON. Returns 204 No Content on success (as madmin expects).

type ServiceAccountHandlers

type ServiceAccountHandlers interface {
	HandleListServiceAccounts() http.Handler
	HandleAddServiceAccount() http.Handler
	HandleDeleteServiceAccount() http.Handler
	HandleServiceAccountInfo() http.Handler
	HandleUpdateServiceAccount() http.Handler
}

type UserHTTPService

type UserHTTPService struct {
	// contains filtered or unexported fields
}

func (*UserHTTPService) CreateUser

func (s *UserHTTPService) CreateUser(w nethttp.ResponseWriter, r *nethttp.Request)

func (*UserHTTPService) InfoUser

func (*UserHTTPService) ListUsers

func (*UserHTTPService) RemoveUser

func (s *UserHTTPService) RemoveUser(w nethttp.ResponseWriter, r *nethttp.Request)

func (*UserHTTPService) SetUserStatus

func (s *UserHTTPService) SetUserStatus(w nethttp.ResponseWriter, r *nethttp.Request)

type UserHandlers

type UserHandlers interface {
	HandleListUsers() http.Handler
	HandleAddUser() http.Handler
	HandleRemoveUser() http.Handler
	HandleUserInfo() http.Handler
	HandleSetUserStatus() http.Handler
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL