v1

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthData

type AuthData struct {
	ClientName   string `json:"clientName"`
	ClientSecret string `json:"clientSecret"`
	ServerURL    string `json:"serverURL"`
	JwtSecret    string `json:"jwtSecret"`
}

func NewAuthData

func NewAuthData(clientName string, clientSecret string, serverURL string, jwtSecret string) *AuthData

type GraphQLClient

type GraphQLClient struct {
	TokenData *TokenData
	// contains filtered or unexported fields
}

func NewGraphQLClient

func NewGraphQLClient(authData *AuthData) *GraphQLClient

func (*GraphQLClient) ExecuteLogRequestsMutation

func (gql *GraphQLClient) ExecuteLogRequestsMutation(requestsMap *map[string]time.Time) (LogResponse, error)

func (*GraphQLClient) ExecuteRedirectsQuery

func (gql *GraphQLClient) ExecuteRedirectsQuery() ([]Redirect, error)

func (*GraphQLClient) GetClient

func (gql *GraphQLClient) GetClient() *graphql.Client

GetClient makes sure the access token is refreshed

type LogRequestsInput

type LogRequestsInput struct {
	RequestURL string    `json:"requestURL"`
	HitTime    time.Time `json:"hitTime"`
}

type LogResponse

type LogResponse struct {
	Success bool   `graphql:"success"`
	Message string `graphql:"message"`
}

type PageInfo added in v0.1.9

type PageInfo struct {
	HasNextPage bool
	EndCursor   string
}

type Redirect

type Redirect struct {
	Id         string    `graphql:"id"`
	FromURL    string    `graphql:"fromURL"`
	FromDomain string    `graphql:"fromDomain"`
	ToURL      string    `graphql:"toURL"`
	UpdatedAt  time.Time `graphql:"updatedAt"`
}

type RedirectConnection added in v0.1.9

type RedirectConnection struct {
	Edges    []RedirectEdge
	PageInfo PageInfo
}

type RedirectEdge added in v0.1.9

type RedirectEdge struct {
	Node   Redirect
	Cursor string
}

type TokenData

type TokenData struct {
	Token string
}

func NewTokenData

func NewTokenData() *TokenData

Jump to

Keyboard shortcuts

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