alianco

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCitizensToRealmsEndpointFactory

func AddCitizensToRealmsEndpointFactory(svc AliancoService, resolveProfilesAliasesEndpoint endpoint.Endpoint) endpoint.Endpoint

func CreateRealmsEndpointFactory

func CreateRealmsEndpointFactory(svc AliancoService, resolveProfilesAliasesEndpoint endpoint.Endpoint) endpoint.Endpoint

func GetCitizensRealmsEndpointFactory

func GetCitizensRealmsEndpointFactory(svc AliancoService, resolveProfilesAliasesEndpoint endpoint.Endpoint) endpoint.Endpoint

func GetProfiles

func GetProfiles(ctx context.Context, endpoint endpoint.Endpoint, profilesIds []string) ([]*animo.Profile, error)

func GetRealmsCitizensEndpointFactory

func GetRealmsCitizensEndpointFactory(svc AliancoService, resolveProfilesAliasesEndpoint endpoint.Endpoint) endpoint.Endpoint

func MakeGetRealmsEndpoint

func MakeGetRealmsEndpoint(svc AliancoService) endpoint.Endpoint

func RemoveCitizensFromRealmsEndpointFactory

func RemoveCitizensFromRealmsEndpointFactory(svc AliancoService, resolveProfilesAliasesEndpoint endpoint.Endpoint) endpoint.Endpoint

func ResolveProfilesAliases

func ResolveProfilesAliases(ctx context.Context, endpoint endpoint.Endpoint, profilesAliases []string) ([]string, error)

func ResolveRealmsAliasesEndpointFactory

func ResolveRealmsAliasesEndpointFactory(svc AliancoService) endpoint.Endpoint

Types

type AddCitizensToRealmsRequest

type AddCitizensToRealmsRequest struct {
	RealmsAliases   []string   `json:"realmsAliases"`
	ProfilesAliases [][]string `json:"profilesAliases"`
}

type AddCitizensToRealmsResponse

type AddCitizensToRealmsResponse struct {
	RealmsCitizens [][]*Citizen `json:"realmsCitizens"`
	Err            string       `json:"err,omitempty"`
}

type AliancoService

type AliancoService interface {
	ResolveRealmsAliases(context context.Context, realmsAliases []string) ([]*Realm, error)
	GetCitizensRealms(context context.Context, profilesIDs []string) ([][]*Realm, error)
	CreateRealms(context context.Context, profilesIDs []string, realms []*Realm) ([]*Realm, error)
	GetRealmsCitizens(context context.Context, realmsIDs []string) ([][]*Citizen, error)
	GetRealms(context context.Context, realmIDs []string, realms []*Realm) (int, error)
	AddCitizensToRealms(context context.Context, realmsIDs []string, profilesIDs [][]string) ([][]*Citizen, error)
	RemoveCitizensFromRealms(context context.Context, realmsIDs []string, profilesIDs [][]string) ([][]*Citizen, error)
}

type Citizen

type Citizen struct {
	ID           string `json:"-"`
	ProfileID    string `json:"-"`
	RealmID      string `json:"-"`
	ProfileAlias string `json:"profileAlias"`
	Role         string `json:"role"`
}

type CitizensList

type CitizensList struct {
	Citizens []*Citizen `json:"citizens"`
}

type CreateRealmsRequest

type CreateRealmsRequest struct {
	ProfilesAliases []string `json:"profilesAliases"`
	Realms          []*Realm `json:"realms"`
}

type CreateRealmsResponse

type CreateRealmsResponse struct {
	Realms []*Realm `json:"realms"`
	Err    string   `json:"err,omitempty"`
}

type Endpoints

type Endpoints struct {
	ResolveRealmsAliasesEndpoint     endpoint.Endpoint
	GetCitizensRealmsEndpoint        endpoint.Endpoint
	CreateRealmsEndpoint             endpoint.Endpoint
	GetRealmsEndpoint                endpoint.Endpoint
	GetRealmsCitizensEndpoint        endpoint.Endpoint
	AddCitizensToRealmsEndpoint      endpoint.Endpoint
	RemoveCitizensFromRealmsEndpoint endpoint.Endpoint
}

type GetCitizensRealmsRequest

type GetCitizensRealmsRequest struct {
	ProfilesAliases []string `json:"profilesAliases"`
}

type GetCitizensRealmsResponse

type GetCitizensRealmsResponse struct {
	CitizensRealms []*RealmsList `json:"citizensRealms"`
	Err            string        `json:"err,omitempty"`
}

type GetRealmsCitizensRequest

type GetRealmsCitizensRequest struct {
	RealmsAliases []string `json:"realmsAliases"`
}

type GetRealmsCitizensResponse

type GetRealmsCitizensResponse struct {
	RealmsCitizens []*CitizensList `json:"realmsCitizens"`
	Err            string          `json:"err,omitempty"`
}

type GetRealmsRequest

type GetRealmsRequest struct {
	RealmIDs []string `json:"realmIDs"`
}

type GetRealmsResponse

type GetRealmsResponse struct {
	Realms []*Realm `json:"realms"`
	Err    string   `json:"err,omitempty"`
}

type Realm

type Realm struct {
	ID      string `json:"id"`
	Alias   string `json:"alias"`
	Name    string `json:"name"`
	Picture string `json:"picture"`
}

type RealmsList

type RealmsList struct {
	Realms []*Realm `json:"realms"`
}

type RemoveCitizensFromRealmsRequest

type RemoveCitizensFromRealmsRequest struct {
	RealmsAliases   []string   `json:"realmsAliases"`
	ProfilesAliases [][]string `json:"profilesAliases"`
}

type RemoveCitizensFromRealmsResponse

type RemoveCitizensFromRealmsResponse struct {
	RealmsCitizens [][]*Citizen `json:"realmsCitizens"`
	Err            string       `json:"err,omitempty"`
}

type ResolveRealmsAliasesRequest

type ResolveRealmsAliasesRequest struct {
	RealmsAliases []string `json:"realmsAliases"`
}

type ResolveRealmsAliasesResponse

type ResolveRealmsAliasesResponse struct {
	Realms []*Realm `json:"realms"`
	Err    string   `json:"err,omitempty"`
}

Directories

Path Synopsis
auth
jwt
service
transport

Jump to

Keyboard shortcuts

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