Documentation
¶
Index ¶
- Constants
- func NewUnknownError() error
- type ClientOption
- type Error
- type ErrorCode
- type FindPeopleRequest
- type FindPeopleResponse
- type FindTeamResponse
- type FindTeamsRequest
- type FindTeamsResponse
- type Meta
- type NamedEntity
- type Person
- type PersonWithTeam
- type ResponseWithMeta
- type SpanAPIClient
- type Team
- type TeamMember
- type TeamWithMembers
Constants ¶
View Source
const (
DefaultEndpoint = "https://span.app/api/external/v1"
)
Variables ¶
This section is empty.
Functions ¶
func NewUnknownError ¶
func NewUnknownError() error
Types ¶
type ClientOption ¶
type ClientOption func(*clientOptions) *clientOptions
func WithEndpoint ¶
func WithEndpoint(endpoint string) ClientOption
func WithToken ¶
func WithToken(token string) ClientOption
type FindPeopleRequest ¶
type FindPeopleResponse ¶
type FindPeopleResponse struct { ResponseWithMeta Data []PersonWithTeam `json:"data"` }
type FindTeamResponse ¶
type FindTeamResponse struct { ResponseWithMeta Data TeamWithMembers `json:"data"` }
type FindTeamsRequest ¶
type FindTeamsRequest struct {
Name string
}
type FindTeamsResponse ¶
type FindTeamsResponse struct { ResponseWithMeta Data []Team `json:"data"` }
type NamedEntity ¶
type PersonWithTeam ¶
type PersonWithTeam struct { Person Teams []NamedEntity `json:"teams"` }
type ResponseWithMeta ¶
type ResponseWithMeta struct {
Meta Meta `json:"meta"`
}
type SpanAPIClient ¶
type SpanAPIClient interface { FindPeople(r FindPeopleRequest) ([]PersonWithTeam, error) FindTeams(r FindTeamsRequest) ([]Team, error) FindTeamByID(teamID string) (*TeamWithMembers, error) }
func NewSpanAPIClient ¶
func NewSpanAPIClient(opt ...ClientOption) (SpanAPIClient, error)
NewSpanAPIClient instantiates a new client able to connect to the SPAN api
type Team ¶
type Team struct { NamedEntity Slug string `json:"slug"` CreatedAt time.Time `json:"createdAt"` }
type TeamMember ¶
type TeamWithMembers ¶
type TeamWithMembers struct { Team Members []TeamMember `json:"members"` }
Click to show internal directories.
Click to hide internal directories.