Documentation ¶
Index ¶
- func ConvertToCS3PublicShare(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*link.PublicShare, error)
- func ConvertToCS3ReceivedShare(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*collaboration.ReceivedShare, error)
- func ConvertToCS3Share(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*collaboration.Share, error)
- func ExtractGrantee(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, t int, g string) (*provider.Grantee, error)
- func ExtractGroupID(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, u string) (*grouppb.GroupId, error)
- func ExtractUserID(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, u string) (*userpb.UserId, error)
- func FormatGrantee(g *provider.Grantee) (int, string)
- func FormatGroupID(u *grouppb.GroupId) string
- func FormatUserID(u *userpb.UserId) string
- func IntToShareState(g int) collaboration.ShareState
- func IntTosharePerm(p int, itemType string) *provider.ResourcePermissions
- func ResourceTypeToItem(r provider.ResourceType) string
- func ResourceTypeToItemInt(r provider.ResourceType) int
- func SharePermToInt(p *provider.ResourcePermissions) int
- type APITokenManager
- type DBShare
- type OIDCToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToCS3PublicShare ¶
func ConvertToCS3PublicShare(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*link.PublicShare, error)
ConvertToCS3PublicShare converts a DBShare to a CS3API public share.
func ConvertToCS3ReceivedShare ¶
func ConvertToCS3ReceivedShare(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*collaboration.ReceivedShare, error)
ConvertToCS3ReceivedShare converts a DBShare to a CS3API collaboration received share.
func ConvertToCS3Share ¶
func ConvertToCS3Share(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, s DBShare) (*collaboration.Share, error)
ConvertToCS3Share converts a DBShare to a CS3API collaboration share.
func ExtractGrantee ¶
func ExtractGrantee(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, t int, g string) (*provider.Grantee, error)
ExtractGrantee retrieves the CS3API grantee from a formatted string.
func ExtractGroupID ¶
func ExtractGroupID(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, u string) (*grouppb.GroupId, error)
ExtractGroupID retrieves a CS3API group ID from a string.
func ExtractUserID ¶
func ExtractUserID(ctx context.Context, gateway gatewayv1beta1.GatewayAPIClient, u string) (*userpb.UserId, error)
ExtractUserID retrieves a CS3API user ID from a string.
func FormatGrantee ¶
FormatGrantee formats a CS3API grantee to a string.
func FormatGroupID ¶
FormatGroupID formats a CS3API group ID to a string.
func FormatUserID ¶
FormatUserID formats a CS3API user ID to a string.
func IntToShareState ¶
func IntToShareState(g int) collaboration.ShareState
IntToShareState retrieves the received share state from an integer.
func IntTosharePerm ¶
func IntTosharePerm(p int, itemType string) *provider.ResourcePermissions
IntTosharePerm retrieves read/write permissions from an integer.
func ResourceTypeToItem ¶
func ResourceTypeToItem(r provider.ResourceType) string
ResourceTypeToItem maps a resource type to a string.
func ResourceTypeToItemInt ¶
func ResourceTypeToItemInt(r provider.ResourceType) int
ResourceTypeToItemInt maps a resource type to an integer.
func SharePermToInt ¶
func SharePermToInt(p *provider.ResourcePermissions) int
SharePermToInt maps read/write permissions to an integer.
Types ¶
type APITokenManager ¶
type APITokenManager struct {
// contains filtered or unexported fields
}
APITokenManager stores config related to api management
func InitAPITokenManager ¶
func InitAPITokenManager(targetAPI, oidcTokenEndpoint, clientID, clientSecret string) *APITokenManager
InitAPITokenManager initializes a new APITokenManager
func (*APITokenManager) SendAPIGetRequest ¶
func (a *APITokenManager) SendAPIGetRequest(ctx context.Context, url string, forceRenewal bool) (map[string]interface{}, error)
SendAPIGetRequest makes an API GET Request to the passed URL