package
0.0.0-20230101183712-202847b4b89b
Repository: https://github.com/corestoreio/csfw.git
Documentation: pkg.go.dev
# Functions
FromBytes returns the Type from a byte slice.
FromContext returns the requested current store scope and its parent website scope from a context.
FromString returns the Type from a string: default, websites or stores.
FromType returns the string representation for a Type.
MakePerm creates a Perm type based on the input argument which can be either: "default","d" or "" for PermDefault, "websites", "website" or "w" for PermWebsite OR "stores", "store" or "s" for PermStore.
MakeTypeID creates a new merged value of a Type and its ID.
MakeTypeIDString creates a TypeID from an uint base 10 numbered string.
Valid checks if s is a valid StrScope of either StrDefault, StrWebsites or StrStores.
ValidBytes checks if b is a valid byte Type of either StrDefault, StrWebsites or StrStores.
ValidParent validates if the parent scope is within the hierarchical chain: default -> website -> store.
WithContext adds the store scope with its parent website scope to the context.
# Constants
must start with 0.
Those constants define the overall scopes.
DefaultTypeID default Hash value for Default Scope and ID 0.
Those constants define the overall scopes.
MaxID maximum allowed ID which can be packed into a TypeID.
PermDefault convenient helper contains default scope permission level.
PermStore convenient helper contains all scope permission levels.
PermStoreReverse convenient helper to enforce hierarchy levels.
PermWebsite convenient helper contains default and website scope permission levels.
PermWebsiteReverse convenient helper to enforce hierarchy levels.
Those constants define the overall scopes.
Str* constants are used in the database table core_config_data.
Str* constants are used in the database table core_config_data.
Str* constants are used in the database table core_config_data.
TypeIDMaxSegments maximum supported segments or also known as shards.
Those constants define the overall scopes.
# Type aliases
Perm is a bit set and used for permissions depending on the scope.Type.
Type or also known as Scope defines the hierarchy of the overall CoreStore library.
TypeID defines a merged Scope with its ID.
TypeIDs collection of multiple TypeID values.
TypeStr represents a string Type from table `core_config_data` column scope with special functions attached, mainly for path generation.