Documentation
¶
Index ¶
- Constants
- func RegisterAdminServiceHandler(server *connect.Server, svc AdminServiceHandler)
- type AdminServiceClient
- type AdminServiceHandler
- type UnimplementedAdminServiceHandler
- func (UnimplementedAdminServiceHandler) CreateShare(context.Context, *adminpb.CreateShareRequest) (*adminpb.CreateShareResponse, error)
- func (UnimplementedAdminServiceHandler) CreateVolume(context.Context, *adminpb.CreateVolumeRequest) (*adminpb.CreateVolumeResponse, error)
- func (UnimplementedAdminServiceHandler) DeleteShare(context.Context, *adminpb.DeleteShareRequest) (*adminpb.DeleteShareResponse, error)
- func (UnimplementedAdminServiceHandler) DeleteVolume(context.Context, *adminpb.DeleteVolumeRequest) (*adminpb.DeleteVolumeResponse, error)
- func (UnimplementedAdminServiceHandler) DisableShare(context.Context, *adminpb.DisableShareRequest) (*adminpb.DisableShareResponse, error)
- func (UnimplementedAdminServiceHandler) EnableShare(context.Context, *adminpb.EnableShareRequest) (*adminpb.EnableShareResponse, error)
- func (UnimplementedAdminServiceHandler) GetServerInfo(context.Context, *adminpb.GetServerInfoRequest) (*adminpb.GetServerInfoResponse, error)
- func (UnimplementedAdminServiceHandler) GetShare(context.Context, *adminpb.GetShareRequest) (*adminpb.GetShareResponse, error)
- func (UnimplementedAdminServiceHandler) GetVolume(context.Context, *adminpb.GetVolumeRequest) (*adminpb.GetVolumeResponse, error)
- func (UnimplementedAdminServiceHandler) Grant(context.Context, *adminpb.GrantRequest) (*adminpb.GrantResponse, error)
- func (UnimplementedAdminServiceHandler) ListGroups(context.Context, *adminpb.ListGroupsRequest) (*adminpb.ListGroupsResponse, error)
- func (UnimplementedAdminServiceHandler) ListParents(context.Context, *adminpb.ListParentsRequest) (*adminpb.ListParentsResponse, error)
- func (UnimplementedAdminServiceHandler) ListShares(context.Context, *adminpb.ListSharesRequest) (*adminpb.ListSharesResponse, error)
- func (UnimplementedAdminServiceHandler) ListUsers(context.Context, *adminpb.ListUsersRequest) (*adminpb.ListUsersResponse, error)
- func (UnimplementedAdminServiceHandler) ListVolumes(context.Context, *adminpb.ListVolumesRequest) (*adminpb.ListVolumesResponse, error)
- func (UnimplementedAdminServiceHandler) ReloadDirectory(context.Context, *adminpb.ReloadDirectoryRequest) (*adminpb.ReloadDirectoryResponse, error)
- func (UnimplementedAdminServiceHandler) ResizeVolume(context.Context, *adminpb.ResizeVolumeRequest) (*adminpb.ResizeVolumeResponse, error)
- func (UnimplementedAdminServiceHandler) Revoke(context.Context, *adminpb.RevokeRequest) (*adminpb.RevokeResponse, error)
- func (UnimplementedAdminServiceHandler) SnapshotVolume(context.Context, *adminpb.SnapshotVolumeRequest) (*adminpb.SnapshotVolumeResponse, error)
- func (UnimplementedAdminServiceHandler) UpdateShare(context.Context, *adminpb.UpdateShareRequest) (*adminpb.UpdateShareResponse, error)
Constants ¶
const ( // AdminServiceGetServerInfoProcedure is the procedure name of the AdminService's GetServerInfo RPC. AdminServiceGetServerInfoProcedure = "/fileshare.admin.v1.AdminService/GetServerInfo" AdminServiceListSharesProcedure = "/fileshare.admin.v1.AdminService/ListShares" AdminServiceGetShareProcedure = "/fileshare.admin.v1.AdminService/GetShare" AdminServiceCreateShareProcedure = "/fileshare.admin.v1.AdminService/CreateShare" AdminServiceUpdateShareProcedure = "/fileshare.admin.v1.AdminService/UpdateShare" AdminServiceDeleteShareProcedure = "/fileshare.admin.v1.AdminService/DeleteShare" AdminServiceDisableShareProcedure = "/fileshare.admin.v1.AdminService/DisableShare" AdminServiceEnableShareProcedure = "/fileshare.admin.v1.AdminService/EnableShare" // AdminServiceGrantProcedure is the procedure name of the AdminService's Grant RPC. AdminServiceGrantProcedure = "/fileshare.admin.v1.AdminService/Grant" // AdminServiceRevokeProcedure is the procedure name of the AdminService's Revoke RPC. AdminServiceRevokeProcedure = "/fileshare.admin.v1.AdminService/Revoke" // AdminServiceReloadDirectoryProcedure is the procedure name of the AdminService's ReloadDirectory // RPC. AdminServiceReloadDirectoryProcedure = "/fileshare.admin.v1.AdminService/ReloadDirectory" // AdminServiceListUsersProcedure is the procedure name of the AdminService's ListUsers RPC. AdminServiceListUsersProcedure = "/fileshare.admin.v1.AdminService/ListUsers" // AdminServiceListGroupsProcedure is the procedure name of the AdminService's ListGroups RPC. AdminServiceListGroupsProcedure = "/fileshare.admin.v1.AdminService/ListGroups" // AdminServiceListParentsProcedure is the procedure name of the AdminService's ListParents RPC. AdminServiceListParentsProcedure = "/fileshare.admin.v1.AdminService/ListParents" // AdminServiceCreateVolumeProcedure is the procedure name of the AdminService's CreateVolume RPC. AdminServiceCreateVolumeProcedure = "/fileshare.admin.v1.AdminService/CreateVolume" // AdminServiceResizeVolumeProcedure is the procedure name of the AdminService's ResizeVolume RPC. AdminServiceResizeVolumeProcedure = "/fileshare.admin.v1.AdminService/ResizeVolume" // AdminServiceSnapshotVolumeProcedure is the procedure name of the AdminService's SnapshotVolume // RPC. AdminServiceSnapshotVolumeProcedure = "/fileshare.admin.v1.AdminService/SnapshotVolume" // AdminServiceDeleteVolumeProcedure is the procedure name of the AdminService's DeleteVolume RPC. AdminServiceDeleteVolumeProcedure = "/fileshare.admin.v1.AdminService/DeleteVolume" // AdminServiceGetVolumeProcedure is the procedure name of the AdminService's GetVolume RPC. AdminServiceGetVolumeProcedure = "/fileshare.admin.v1.AdminService/GetVolume" // AdminServiceListVolumesProcedure is the procedure name of the AdminService's ListVolumes RPC. AdminServiceListVolumesProcedure = "/fileshare.admin.v1.AdminService/ListVolumes" )
These constants are the procedure names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// AdminServiceName is the fully-qualified name of the AdminService service.
AdminServiceName = "fileshare.admin.v1.AdminService"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterAdminServiceHandler ¶
func RegisterAdminServiceHandler(server *connect.Server, svc AdminServiceHandler)
RegisterAdminServiceHandler registers svc as the fileshare.admin.v1.AdminService implementation on server.
Types ¶
type AdminServiceClient ¶
type AdminServiceClient interface {
GetServerInfo(context.Context, *adminpb.GetServerInfoRequest) (*adminpb.GetServerInfoResponse, error)
// CreateShare needs at least one grant. A share with none is open to
// anyone who authenticates, which the configuration file can say on
// purpose and an API call should not say by omission.
// DisableShare stops serving a share and keeps its definition, the way
// Samba's `available = no` does: every attempt to connect fails, the
// connections already open are closed, and its image or directory is let
// go of -- so the file can be replaced while it is disabled. EnableShare
// serves it again, and is refused when its source can no longer be opened.
//
// Unlike every other change, these apply to a share of the configuration
// too: taking a share offline is an operation, not a definition. It is
// kept in the state file, and a restart does not bring the share back.
// Grant gives a subject access to a share, or changes the access it has.
Grant(context.Context, *adminpb.GrantRequest) (*adminpb.GrantResponse, error)
// Revoke takes it away. Revoking the last grant is refused, for the reason
// CreateShare needs one: delete the share instead.
Revoke(context.Context, *adminpb.RevokeRequest) (*adminpb.RevokeResponse, error)
// ReloadDirectory reads the people again, now, rather than at the next
// `reload` interval or SIGHUP. Only additions are applied in place; any
// removal, changed credential, or share whose expanded lists changed
// starts a new generation and closes the connections of the old one --
// which is how disabling somebody in the directory reaches the sessions
// they already have. A directory that cannot be read changes nothing, and
// is UNAVAILABLE.
ReloadDirectory(context.Context, *adminpb.ReloadDirectoryRequest) (*adminpb.ReloadDirectoryResponse, error)
// Who a grant can name.
ListUsers(context.Context, *adminpb.ListUsersRequest) (*adminpb.ListUsersResponse, error)
ListGroups(context.Context, *adminpb.ListGroupsRequest) (*adminpb.ListGroupsResponse, error)
// ListParents is where volumes may be created, as the provisioner's own
// configuration says.
ListParents(context.Context, *adminpb.ListParentsRequest) (*adminpb.ListParentsResponse, error)
// CreateVolume is idempotent by name: the same quota answers with the
// volume that exists (created false), another is ALREADY_EXISTS.
CreateVolume(context.Context, *adminpb.CreateVolumeRequest) (*adminpb.CreateVolumeResponse, error)
// ResizeVolume changes the quota, either way, never below what is used.
ResizeVolume(context.Context, *adminpb.ResizeVolumeRequest) (*adminpb.ResizeVolumeResponse, error)
// SnapshotVolume takes a read-only snapshot (ZFS, btrfs).
SnapshotVolume(context.Context, *adminpb.SnapshotVolumeRequest) (*adminpb.SnapshotVolumeResponse, error)
// DeleteVolume is refused with FAILED_PRECONDITION while a share uses the
// volume -- delete the share first. DeleteShare never deletes a volume.
DeleteVolume(context.Context, *adminpb.DeleteVolumeRequest) (*adminpb.DeleteVolumeResponse, error)
GetVolume(context.Context, *adminpb.GetVolumeRequest) (*adminpb.GetVolumeResponse, error)
ListVolumes(context.Context, *adminpb.ListVolumesRequest) (*adminpb.ListVolumesResponse, error)
}
AdminServiceClient is a client for the fileshare.admin.v1.AdminService service.
func NewAdminServiceClient ¶
func NewAdminServiceClient(client *connect.Client) AdminServiceClient
NewAdminServiceClient constructs a client for the fileshare.admin.v1.AdminService service. Multiple service clients may share a single connect.Client.
type AdminServiceHandler ¶
type AdminServiceHandler interface {
GetServerInfo(context.Context, *adminpb.GetServerInfoRequest) (*adminpb.GetServerInfoResponse, error)
// CreateShare needs at least one grant. A share with none is open to
// anyone who authenticates, which the configuration file can say on
// purpose and an API call should not say by omission.
// DisableShare stops serving a share and keeps its definition, the way
// Samba's `available = no` does: every attempt to connect fails, the
// connections already open are closed, and its image or directory is let
// go of -- so the file can be replaced while it is disabled. EnableShare
// serves it again, and is refused when its source can no longer be opened.
//
// Unlike every other change, these apply to a share of the configuration
// too: taking a share offline is an operation, not a definition. It is
// kept in the state file, and a restart does not bring the share back.
// Grant gives a subject access to a share, or changes the access it has.
Grant(context.Context, *adminpb.GrantRequest) (*adminpb.GrantResponse, error)
// Revoke takes it away. Revoking the last grant is refused, for the reason
// CreateShare needs one: delete the share instead.
Revoke(context.Context, *adminpb.RevokeRequest) (*adminpb.RevokeResponse, error)
// ReloadDirectory reads the people again, now, rather than at the next
// `reload` interval or SIGHUP. Only additions are applied in place; any
// removal, changed credential, or share whose expanded lists changed
// starts a new generation and closes the connections of the old one --
// which is how disabling somebody in the directory reaches the sessions
// they already have. A directory that cannot be read changes nothing, and
// is UNAVAILABLE.
ReloadDirectory(context.Context, *adminpb.ReloadDirectoryRequest) (*adminpb.ReloadDirectoryResponse, error)
// Who a grant can name.
ListUsers(context.Context, *adminpb.ListUsersRequest) (*adminpb.ListUsersResponse, error)
ListGroups(context.Context, *adminpb.ListGroupsRequest) (*adminpb.ListGroupsResponse, error)
// ListParents is where volumes may be created, as the provisioner's own
// configuration says.
ListParents(context.Context, *adminpb.ListParentsRequest) (*adminpb.ListParentsResponse, error)
// CreateVolume is idempotent by name: the same quota answers with the
// volume that exists (created false), another is ALREADY_EXISTS.
CreateVolume(context.Context, *adminpb.CreateVolumeRequest) (*adminpb.CreateVolumeResponse, error)
// ResizeVolume changes the quota, either way, never below what is used.
ResizeVolume(context.Context, *adminpb.ResizeVolumeRequest) (*adminpb.ResizeVolumeResponse, error)
// SnapshotVolume takes a read-only snapshot (ZFS, btrfs).
SnapshotVolume(context.Context, *adminpb.SnapshotVolumeRequest) (*adminpb.SnapshotVolumeResponse, error)
// DeleteVolume is refused with FAILED_PRECONDITION while a share uses the
// volume -- delete the share first. DeleteShare never deletes a volume.
DeleteVolume(context.Context, *adminpb.DeleteVolumeRequest) (*adminpb.DeleteVolumeResponse, error)
GetVolume(context.Context, *adminpb.GetVolumeRequest) (*adminpb.GetVolumeResponse, error)
ListVolumes(context.Context, *adminpb.ListVolumesRequest) (*adminpb.ListVolumesResponse, error)
}
AdminServiceHandler is an implementation of the fileshare.admin.v1.AdminService service.
type UnimplementedAdminServiceHandler ¶
type UnimplementedAdminServiceHandler struct{}
UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedAdminServiceHandler) CreateShare ¶
func (UnimplementedAdminServiceHandler) CreateShare(context.Context, *adminpb.CreateShareRequest) (*adminpb.CreateShareResponse, error)
func (UnimplementedAdminServiceHandler) CreateVolume ¶
func (UnimplementedAdminServiceHandler) CreateVolume(context.Context, *adminpb.CreateVolumeRequest) (*adminpb.CreateVolumeResponse, error)
func (UnimplementedAdminServiceHandler) DeleteShare ¶
func (UnimplementedAdminServiceHandler) DeleteShare(context.Context, *adminpb.DeleteShareRequest) (*adminpb.DeleteShareResponse, error)
func (UnimplementedAdminServiceHandler) DeleteVolume ¶
func (UnimplementedAdminServiceHandler) DeleteVolume(context.Context, *adminpb.DeleteVolumeRequest) (*adminpb.DeleteVolumeResponse, error)
func (UnimplementedAdminServiceHandler) DisableShare ¶
func (UnimplementedAdminServiceHandler) DisableShare(context.Context, *adminpb.DisableShareRequest) (*adminpb.DisableShareResponse, error)
func (UnimplementedAdminServiceHandler) EnableShare ¶
func (UnimplementedAdminServiceHandler) EnableShare(context.Context, *adminpb.EnableShareRequest) (*adminpb.EnableShareResponse, error)
func (UnimplementedAdminServiceHandler) GetServerInfo ¶
func (UnimplementedAdminServiceHandler) GetServerInfo(context.Context, *adminpb.GetServerInfoRequest) (*adminpb.GetServerInfoResponse, error)
func (UnimplementedAdminServiceHandler) GetShare ¶
func (UnimplementedAdminServiceHandler) GetShare(context.Context, *adminpb.GetShareRequest) (*adminpb.GetShareResponse, error)
func (UnimplementedAdminServiceHandler) GetVolume ¶
func (UnimplementedAdminServiceHandler) GetVolume(context.Context, *adminpb.GetVolumeRequest) (*adminpb.GetVolumeResponse, error)
func (UnimplementedAdminServiceHandler) Grant ¶
func (UnimplementedAdminServiceHandler) Grant(context.Context, *adminpb.GrantRequest) (*adminpb.GrantResponse, error)
func (UnimplementedAdminServiceHandler) ListGroups ¶
func (UnimplementedAdminServiceHandler) ListGroups(context.Context, *adminpb.ListGroupsRequest) (*adminpb.ListGroupsResponse, error)
func (UnimplementedAdminServiceHandler) ListParents ¶
func (UnimplementedAdminServiceHandler) ListParents(context.Context, *adminpb.ListParentsRequest) (*adminpb.ListParentsResponse, error)
func (UnimplementedAdminServiceHandler) ListShares ¶
func (UnimplementedAdminServiceHandler) ListShares(context.Context, *adminpb.ListSharesRequest) (*adminpb.ListSharesResponse, error)
func (UnimplementedAdminServiceHandler) ListUsers ¶
func (UnimplementedAdminServiceHandler) ListUsers(context.Context, *adminpb.ListUsersRequest) (*adminpb.ListUsersResponse, error)
func (UnimplementedAdminServiceHandler) ListVolumes ¶
func (UnimplementedAdminServiceHandler) ListVolumes(context.Context, *adminpb.ListVolumesRequest) (*adminpb.ListVolumesResponse, error)
func (UnimplementedAdminServiceHandler) ReloadDirectory ¶
func (UnimplementedAdminServiceHandler) ReloadDirectory(context.Context, *adminpb.ReloadDirectoryRequest) (*adminpb.ReloadDirectoryResponse, error)
func (UnimplementedAdminServiceHandler) ResizeVolume ¶
func (UnimplementedAdminServiceHandler) ResizeVolume(context.Context, *adminpb.ResizeVolumeRequest) (*adminpb.ResizeVolumeResponse, error)
func (UnimplementedAdminServiceHandler) Revoke ¶
func (UnimplementedAdminServiceHandler) Revoke(context.Context, *adminpb.RevokeRequest) (*adminpb.RevokeResponse, error)
func (UnimplementedAdminServiceHandler) SnapshotVolume ¶
func (UnimplementedAdminServiceHandler) SnapshotVolume(context.Context, *adminpb.SnapshotVolumeRequest) (*adminpb.SnapshotVolumeResponse, error)
func (UnimplementedAdminServiceHandler) UpdateShare ¶
func (UnimplementedAdminServiceHandler) UpdateShare(context.Context, *adminpb.UpdateShareRequest) (*adminpb.UpdateShareResponse, error)