pkg

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 ParseID

func ParseID(id string) (string, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL