Help us shape the future of Go! Take the 2026 Go Developer Survey

adminpbconnect

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdminServiceGetServerInfoProcedure is the procedure name of the AdminService's GetServerInfo RPC.
	AdminServiceGetServerInfoProcedure = "/fileshare.admin.v1.AdminService/GetServerInfo"
	// AdminServiceListSharesProcedure is the procedure name of the AdminService's ListShares RPC.
	AdminServiceListSharesProcedure = "/fileshare.admin.v1.AdminService/ListShares"
	// AdminServiceGetShareProcedure is the procedure name of the AdminService's GetShare RPC.
	AdminServiceGetShareProcedure = "/fileshare.admin.v1.AdminService/GetShare"
	// AdminServiceCreateShareProcedure is the procedure name of the AdminService's CreateShare RPC.
	AdminServiceCreateShareProcedure = "/fileshare.admin.v1.AdminService/CreateShare"
	// AdminServiceUpdateShareProcedure is the procedure name of the AdminService's UpdateShare RPC.
	AdminServiceUpdateShareProcedure = "/fileshare.admin.v1.AdminService/UpdateShare"
	// AdminServiceDeleteShareProcedure is the procedure name of the AdminService's DeleteShare RPC.
	AdminServiceDeleteShareProcedure = "/fileshare.admin.v1.AdminService/DeleteShare"
	// AdminServiceDisableShareProcedure is the procedure name of the AdminService's DisableShare RPC.
	AdminServiceDisableShareProcedure = "/fileshare.admin.v1.AdminService/DisableShare"
	// AdminServiceEnableShareProcedure is the procedure name of the AdminService's EnableShare RPC.
	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.

View Source
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)
	ListShares(context.Context, *adminpb.ListSharesRequest) (*adminpb.ListSharesResponse, error)
	GetShare(context.Context, *adminpb.GetShareRequest) (*adminpb.GetShareResponse, 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.
	CreateShare(context.Context, *adminpb.CreateShareRequest) (*adminpb.CreateShareResponse, error)
	UpdateShare(context.Context, *adminpb.UpdateShareRequest) (*adminpb.UpdateShareResponse, error)
	DeleteShare(context.Context, *adminpb.DeleteShareRequest) (*adminpb.DeleteShareResponse, error)
	// 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.
	DisableShare(context.Context, *adminpb.DisableShareRequest) (*adminpb.DisableShareResponse, error)
	EnableShare(context.Context, *adminpb.EnableShareRequest) (*adminpb.EnableShareResponse, error)
	// 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)
	ListShares(context.Context, *adminpb.ListSharesRequest) (*adminpb.ListSharesResponse, error)
	GetShare(context.Context, *adminpb.GetShareRequest) (*adminpb.GetShareResponse, 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.
	CreateShare(context.Context, *adminpb.CreateShareRequest) (*adminpb.CreateShareResponse, error)
	UpdateShare(context.Context, *adminpb.UpdateShareRequest) (*adminpb.UpdateShareResponse, error)
	DeleteShare(context.Context, *adminpb.DeleteShareRequest) (*adminpb.DeleteShareResponse, error)
	// 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.
	DisableShare(context.Context, *adminpb.DisableShareRequest) (*adminpb.DisableShareResponse, error)
	EnableShare(context.Context, *adminpb.EnableShareRequest) (*adminpb.EnableShareResponse, error)
	// 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) DeleteShare

func (UnimplementedAdminServiceHandler) EnableShare

func (UnimplementedAdminServiceHandler) GetShare

func (UnimplementedAdminServiceHandler) GetVolume

func (UnimplementedAdminServiceHandler) Grant

func (UnimplementedAdminServiceHandler) ListGroups

func (UnimplementedAdminServiceHandler) ListParents

func (UnimplementedAdminServiceHandler) ListShares

func (UnimplementedAdminServiceHandler) ListUsers

func (UnimplementedAdminServiceHandler) ListVolumes

func (UnimplementedAdminServiceHandler) Revoke

func (UnimplementedAdminServiceHandler) UpdateShare

Jump to

Keyboard shortcuts

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