Documentation ¶
Index ¶
- func AnnotationsForError(err error) (annotations.Annotations, error)
- func MakeResourceList[T any](ctx context.Context, objects []T, parentResourceID *v2.ResourceId, ...) ([]*v2.Resource, error)
- func ParseID(id string) (string, error)
- func ParsePageToken(i string, resourceID *v2.ResourceId) (*pagination.Bag, error)
- type EnterpriseRolesPagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotationsForError ¶
func AnnotationsForError(err error) (annotations.Annotations, error)
AnnotationsForError - Intercept ratelimit errors from Slack and create and annotation instead. TODO(marcos): maybe this should actually still forward along the error.
func MakeResourceList ¶
func MakeResourceList[T any]( ctx context.Context, objects []T, parentResourceID *v2.ResourceId, toResource func( ctx context.Context, object T, parentResourceID *v2.ResourceId, ) ( *v2.Resource, error, ), ) ([]*v2.Resource, error)
MakeResourceList - turning arbitrary data into Resource slices is and incredibly common thing. TODO(marcos): move to baton-sdk
func ParsePageToken ¶
func ParsePageToken(i string, resourceID *v2.ResourceId) (*pagination.Bag, error)
Types ¶
type EnterpriseRolesPagination ¶
type EnterpriseRolesPagination struct { Cursor string `json:"cursor"` FoundMap map[string]bool `json:"foundMap"` }
func ParseRolesPageToken ¶
func ParseRolesPageToken(i string) (*EnterpriseRolesPagination, error)
func (*EnterpriseRolesPagination) Marshal ¶
func (e *EnterpriseRolesPagination) Marshal() (string, error)
func (*EnterpriseRolesPagination) Unmarshal ¶
func (e *EnterpriseRolesPagination) Unmarshal(input string) error
Click to show internal directories.
Click to hide internal directories.