Documentation
¶
Index ¶
- type K
- type O
- type OU
- type P
- type PU
- type Store
- func (c *Store) GetAPIKeyBySecret(secret string) (*K, bool)
- func (c *Store) GetOrganizationByID(organizationID string) (*O, bool)
- func (c *Store) GetOrganizationsByUserID(userID string) []OU
- func (c *Store) GetProjectByID(projectID string) (*P, bool)
- func (c *Store) GetProjectsByOrganizationID(organizationID string) []P
- func (c *Store) GetProjectsByUserID(userID string) []PU
- func (c *Store) Sync(ctx context.Context, interval time.Duration) error
- type UserInfoLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OU ¶ added in v0.40.0
type OU struct {
Role uv1.OrganizationRole
OrganizationID string
}
OU represents a role associated with a organization user.
type PU ¶ added in v0.40.0
type PU struct {
Role uv1.ProjectRole
ProjectID string
OrganizationID string
}
PU represents a role associated with a project user.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a cache for API keys and organization users.
func NewStore ¶
func NewStore( userInfoListerFactory userInfoListerFactory, debug *config.DebugConfig, ) *Store
NewStore creates a new cache store.
func (*Store) GetAPIKeyBySecret ¶
GetAPIKeyBySecret returns an API key by its secret.
func (*Store) GetOrganizationByID ¶ added in v0.40.0
GetOrganizationByID returns an organization by its ID.
func (*Store) GetOrganizationsByUserID ¶
GetOrganizationsByUserID returns organization users by its user ID.
func (*Store) GetProjectByID ¶ added in v0.40.0
GetProjectByID returns a project by its ID.
func (*Store) GetProjectsByOrganizationID ¶ added in v0.40.0
GetProjectsByOrganizationID returns projects by its organization ID.
func (*Store) GetProjectsByUserID ¶ added in v0.40.0
GetProjectsByUserID returns project users by its user ID.
type UserInfoLister ¶ added in v0.49.0
type UserInfoLister interface {
ListAPIKeys(ctx context.Context, in *uv1.ListAPIKeysRequest, opts ...grpc.CallOption) (*uv1.ListAPIKeysResponse, error)
ListOrganizations(ctx context.Context, in *uv1.ListOrganizationsRequest, opts ...grpc.CallOption) (*uv1.ListOrganizationsResponse, error)
ListOrganizationUsers(ctx context.Context, in *uv1.ListOrganizationUsersRequest, opts ...grpc.CallOption) (*uv1.ListOrganizationUsersResponse, error)
ListProjects(ctx context.Context, in *uv1.ListProjectsRequest, opts ...grpc.CallOption) (*uv1.ListProjectsResponse, error)
ListProjectUsers(ctx context.Context, in *uv1.ListProjectUsersRequest, opts ...grpc.CallOption) (*uv1.ListProjectUsersResponse, error)
}
UserInfoLister is an interface for listing user information.
Click to show internal directories.
Click to hide internal directories.