Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPublicAccessNotAllowed = errors.New("public access is not allowed")
)
View Source
var WireSet = wire.NewSet( ProvidePublicAccess, )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
// Get returns whether public access is enabled on the resource.
Get(
ctx context.Context,
resourceType enum.PublicResourceType,
resourcePath string,
) (bool, error)
// Sets the public access mode for the resource based on the value of 'enable'.
Set(
ctx context.Context,
resourceType enum.PublicResourceType,
resourcePath string,
enable bool,
) error
// Deletes any public access data stored for the resource.
Delete(
ctx context.Context,
resourceType enum.PublicResourceType,
resourcePath string,
) error
// IsPublicAccessSupported return true iff public access is supported under the provided space.
IsPublicAccessSupported(ctx context.Context, parentSpacePath string) (bool, error)
}
Service is an abstraction of an entity responsible for managing public access to resources.
func NewService ¶
func NewService( publicResourceCreationEnabled bool, publicAccessStore store.PublicAccessStore, repoStore store.RepoStore, spaceStore store.SpaceStore, ) Service
func ProvidePublicAccess ¶
func ProvidePublicAccess( config *types.Config, publicAccessStore store.PublicAccessStore, repoStore store.RepoStore, spaceStore store.SpaceStore, ) Service
Click to show internal directories.
Click to hide internal directories.