cloudns

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 10 Imported by: 0

README

cloudns-go

License Documentation Go Compatibility GitHub issues Code Coverage Copyright

Summary

This is an unofficial library for the ClouDNS HTTP API written in Go. Currently all operations related to account, zone and record management have been fully implemented. Further information about the API can be found at the official ClouDNS website.

Quick Start

Initialize cloudns-go by creating a new API client instance with your preferred choice of credentials, which is a combination of the API user password and an user ID, sub-user ID or sub-user name:

client, err := cloudns.New(
    // You must only specify one of these options
    // AuthUserID has the highest set of privileges and access to everything
    // AuthSubUserID and AuthSubUserName are restricted
    cloudns.AuthUserID(42, "cloudns-rocks"),
    cloudns.AuthSubUserID(13, "what-a-lucky-day"),
    cloudns.AuthSubUserName("john", "doe"),
)

After confirming that no error has occurred, you may access the various services available underneath the client object, which currently consists of:

  • client.Accounts: Manage your ClouDNS account and sub-users
  • client.Zones: Manage DNS zones in your account
  • client.Records: Manage records inside a specific DNS zone

You can find more information about the specific methods and structures of cloudns-go by visiting the official documentation on godoc.org.

Example

package main

import (
	"context"
	"fmt"
	"github.com/ppmathis/cloudns-go"
)

func main() {
	client, _ := cloudns.New(
		cloudns.AuthUserID(42, "cloudns-rocks"),
	)

	zone, _ := client.Zones.Get(context.TODO(), "api-example.com")
	result1, _ := client.Zones.SetActive(context.TODO(), zone.Name, true)

	record := cloudns.NewRecord(cloudns.RecordTypeA, "localhost", "1.2.3.4", 3600)
	result2, _ := client.Records.Create(context.TODO(), zone.Name, record)

	fmt.Printf("Zone: %+v\n", zone)
	fmt.Printf("Record: %+v\n", record)
	fmt.Printf("Result of `Zones.SetActive()`: %+v\n", result1)
	fmt.Printf("Result of `Records.Create()`: %+v\n", result2)
}

Documentation

Index

Constants

View Source
const (
	ErrHTTPRequest         = constError("http request failed")
	ErrAPIInvocation       = constError("api invocation failed")
	ErrIllegalArgument     = constError("illegal argument provided")
	ErrInvalidOptions      = constError("invalid options provided")
	ErrMultipleCredentials = constError("more than one kind of credentials specified")
)

Constant errors which can be returned by cloudns-go when something goes wrong

Variables

This section is empty.

Functions

This section is empty.

Types

type APIBool

type APIBool bool

APIBool is a custom type representing the way how ClouDNS treats booleans in their API, as they usually appear as 1 or 0 (as a number or a string) instead of actual JSON booleans

func (APIBool) MarshalJSON

func (b APIBool) MarshalJSON() ([]byte, error)

MarshalJSON converts a APIBool into a 0 or 1 as a number according to the ClouDNS API docs

func (*APIBool) UnmarshalJSON

func (b *APIBool) UnmarshalJSON(data []byte) error

UnmarshalJSON converts a boolean from the ClouDNS API into a sanitized Go boolean

type AccountService

type AccountService struct {
	// contains filtered or unexported fields
}

AccountService is a service object which groups all operations related to ClouDNS account management

func (*AccountService) GetBalance

func (svc *AccountService) GetBalance(ctx context.Context) (float64, error)

GetBalance returns the current account balance / funds for the configured credentials Official Docs: https://www.cloudns.net/wiki/article/354/

func (*AccountService) GetCurrentIP

func (svc *AccountService) GetCurrentIP(ctx context.Context) (net.IP, error)

GetCurrentIP returns the IP address which the ClouDNS API backend sees while connecting to it. Official Docs: https://www.cloudns.net/wiki/article/307/

func (*AccountService) Login

func (svc *AccountService) Login(ctx context.Context) (result StatusResult, err error)

Login attempts authentication against the ClouDNS backend with the configured set of credentials. Official Docs: https://www.cloudns.net/wiki/article/45/

type Auth

type Auth struct {
	Type        AuthType
	UserID      int
	SubUserID   int
	SubUserName string
	Password    string
}

Auth provides methods for turning human-friendly credentials into API parameters

func NewAuth

func NewAuth() *Auth

NewAuth instantiates an empty Auth which contains no credentials / AuthTypeNone

func (*Auth) GetParams

func (auth *Auth) GetParams() HTTPParams

GetParams returns the correct API parameters for the ClouDNS API which should be provided by either query parameters (when using GET) or the POST body as JSON

type AuthType

type AuthType int

AuthType is an enumeration of the various ways of authenticating against the ClouDNS API

const (
	AuthTypeNone AuthType = iota
	AuthTypeUserID
	AuthTypeSubUserID
	AuthTypeSubUserName
)

Enumeration values for AuthType

type CAA

type CAA struct {
	Flag  uint8  `json:"caa_flag,string,omitempty"`
	Type  string `json:"caa_type,omitempty"`
	Value string `json:"caa_value,omitempty"`
}

CAA represents parameters specifically for CAA records

type Client

type Client struct {
	Account *AccountService
	Zones   *ZoneService
	Records *RecordService
	// contains filtered or unexported fields
}

Client provides the main object for interacting with the ClouDNS API. All service objects and settings are being stored underneath within this structure.

func New

func New(options ...Option) (*Client, error)

New instantiates a new ClouDNS client for interacting with the API

type DynamicURL

type DynamicURL struct {
	Host string `json:"host"`
	URL  string `json:"url"`
}

DynamicURL represents a DynDNS URL for a specific zone record

type HTTPParams

type HTTPParams map[string]interface{}

HTTPParams represents a map with string keys and a freely-chosen type. It is used to collect either GET or POST parameters for the ClouDNS API.

type NAPTR

type NAPTR struct {
	Order       uint16 `json:"order,string,omitempty"`
	Preference  uint16 `json:"pref,string,omitempty"`
	Flags       string `json:"flag"`
	Service     string `json:"params"`
	Regexp      string `json:"regexp"`
	Replacement string `json:"replace"`
}

NAPTR represents parameters specifically for NAPTR records

type Nameserver

type Nameserver struct {
	Type          string  `json:"type"`
	Name          string  `json:"name"`
	IPv4          net.IP  `json:"ip4"`
	IPv6          net.IP  `json:"ip6"`
	Location      string  `json:"location"`
	CountryCode   string  `json:"location_cc"`
	DDoSProtected APIBool `json:"ddos_protected"`
}

Nameserver represents a ClouDNS nameserver according to the official API docs

type Option

type Option func(api *Client) error

Option represents functional options which can be specified when instantiating a new API client

func AuthSubUserID

func AuthSubUserID(id int, password string) Option

AuthSubUserID setups sub-user-id based authentication against the ClouDNS API

func AuthSubUserName

func AuthSubUserName(user string, password string) Option

AuthSubUserName setups the sub-user-name based authentication against the ClouDNS API

func AuthUserID

func AuthUserID(id int, password string) Option

AuthUserID setups user-id based authentication against the ClouDNS API

func BaseURL

func BaseURL(baseURL string) Option

BaseURL modifies the base URL of the API client

func HTTPClient

func HTTPClient(httpClient *http.Client) Option

HTTPClient overrides the HTTPClient used by the API client, useful for mocking in unit tests.

func Headers

func Headers(headers http.Header) Option

Headers adds a set of headers to every sent API request. These headers can be overridden by request-specific headers.

func Params

func Params(params HTTPParams) Option

Params adds a set of parameters (either GET or POST) to every sent API request. These are overridden by auth as well as request-specific parameters.

func UserAgent

func UserAgent(userAgent string) Option

UserAgent overrides the default user agent of cloudns-go.

type RP

type RP struct {
	Mail string `json:"mail,omitempty"`
	TXT  string `json:"txt,omitempty"`
}

RP represents parameters specifically for RP records

type Record

type Record struct {
	// Base fields for all records
	ID               int        `json:"id,string,omitempty"`
	Host             string     `json:"host"`
	Record           string     `json:"record"`
	RecordType       RecordType `json:"type"`
	TTL              int        `json:"ttl,string"`
	IsActive         APIBool    `json:"status"`
	GeoDNSLocationID int        `json:"geodns-location,omitempty"`

	// Shared field between SRV and MX
	Priority uint16 `json:"priority,string,omitempty"`

	// Type-specific record fields
	CAA
	NAPTR
	RP
	SRV
	SSHFP
	TLSA
	WebRedirect
}

Record represents a ClouDNS record according to the official API docs

func NewRecord

func NewRecord(recordType RecordType, host, record string, ttl int) Record

NewRecord instantiates a new record which can be used within ClouDNS API methods. It does -not- add this record automatically to any given kind of zone.

func NewRecordA

func NewRecordA(host, target string, ttl int) Record

NewRecordA instantiates a new A record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordAAAA

func NewRecordAAAA(host, target string, ttl int) Record

NewRecordAAAA instantiates a new AAAA record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordALIAS

func NewRecordALIAS(host, target string, ttl int) Record

NewRecordALIAS instantiates a new ALIAS record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordCAA

func NewRecordCAA(host string, flag uint8, caaType, value string, ttl int) Record

NewRecordCAA instantiates a new CAA record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordCNAME

func NewRecordCNAME(host, target string, ttl int) Record

NewRecordCNAME instantiates a new CNAME record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordMX

func NewRecordMX(host string, priority uint16, target string, ttl int) Record

NewRecordMX instantiates a new MX record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordNAPTR

func NewRecordNAPTR(host string, order, preference uint16, flags, service, regexp, replacement string, ttl int) Record

NewRecordNAPTR instantiates a new NAPTR record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordNS

func NewRecordNS(host, target string, ttl int) Record

NewRecordNS instantiates a new NS record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordPTR

func NewRecordPTR(host, target string, ttl int) Record

NewRecordPTR instantiates a new PTR record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordRP

func NewRecordRP(host string, mail, txt string, ttl int) Record

NewRecordRP instantiates a new RP record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordSRV

func NewRecordSRV(host string, priority, weight, port uint16, target string, ttl int) Record

NewRecordSRV instantiates a new SRV record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordSSHFP

func NewRecordSSHFP(host string, algorithm, fpType uint8, fingerprint string, ttl int) Record

NewRecordSSHFP instantiates a new SSHFP record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordTLSA

func NewRecordTLSA(host string, usage, selector, matchingType uint8, value string, ttl int) Record

NewRecordTLSA instantiates a new TLSA record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordTXT

func NewRecordTXT(host, value string, ttl int) Record

NewRecordTXT instantiates a new TXT record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func NewRecordWebRedirect

func NewRecordWebRedirect(host, target string, options WebRedirect, ttl int) Record

NewRecordWebRedirect instantiates a new web redirect record. This can also be achieved by manually calling NewRecord and setting the required additional parameters.

func (Record) AsParams

func (rec Record) AsParams() HTTPParams

AsParams returns the HTTP parameters for a record for use within the other API methods

type RecordFormat

type RecordFormat int

RecordFormat is an enumeration of all supported record formats

const (
	RecordFormatBIND RecordFormat = iota
	RecordFormatTinyDNS
)

Enumeration values for RecordFormat

type RecordMap

type RecordMap map[int]Record

RecordMap represents a map of records indexed by the record ID

func (RecordMap) AsSlice

func (rm RecordMap) AsSlice() []Record

AsSlice converts a RecordMap to a slice of records for easier handling

type RecordService

type RecordService struct {
	// contains filtered or unexported fields
}

RecordService is a service object which groups all operations related to ClouDNS record management

func (*RecordService) AvailableRecordTypes

func (svc *RecordService) AvailableRecordTypes(ctx context.Context, zoneType ZoneType, zoneKind ZoneKind) (result []string, err error)

AvailableRecordTypes returns the available record types for a given zone type and kind Official Docs: https://www.cloudns.net/wiki/article/157/

func (*RecordService) AvailableTTLs

func (svc *RecordService) AvailableTTLs(ctx context.Context, zoneName string) (result []int, err error)

AvailableTTLs returns the available record TTLs for a specified zone Official Docs: https://www.cloudns.net/wiki/article/153/

func (*RecordService) ChangeDynamicURL

func (svc *RecordService) ChangeDynamicURL(ctx context.Context, zoneName string, recordID int) (result DynamicURL, err error)

ChangeDynamicURL creates or replaces the current DynDNS url for the given record Official Docs: https://www.cloudns.net/wiki/article/152/

func (*RecordService) CopyFromZone

func (svc *RecordService) CopyFromZone(ctx context.Context, targetZoneName, sourceZoneName string, overwrite bool) (result StatusResult, err error)

CopyFromZone copies all records from one zone into another, optionally overwriting the existing records Official Docs: https://www.cloudns.net/wiki/article/61/

func (*RecordService) Create

func (svc *RecordService) Create(ctx context.Context, zoneName string, record Record) (result StatusResult, err error)

Create a new record within the given zone Official Docs: https://www.cloudns.net/wiki/article/58/

func (*RecordService) Delete

func (svc *RecordService) Delete(ctx context.Context, zoneName string, recordID int) (result StatusResult, err error)

Delete modifies a specific record with a given record ID inside the given zone Official Docs: https://www.cloudns.net/wiki/article/59/

func (*RecordService) DisableDynamicURL

func (svc *RecordService) DisableDynamicURL(ctx context.Context, zoneName string, recordID int) (result StatusResult, err error)

DisableDynamicURL disables the current DynDNS url for the given record Official Docs: https://www.cloudns.net/wiki/article/152/

func (*RecordService) Export

func (svc *RecordService) Export(ctx context.Context, zoneName string) (result RecordsExport, err error)

Export returns all records of the given zone as a BIND zone file Official Docs: https://www.cloudns.net/wiki/article/166/

func (*RecordService) GetDynamicURL

func (svc *RecordService) GetDynamicURL(ctx context.Context, zoneName string, recordID int) (result DynamicURL, err error)

GetDynamicURL returns the current DynDNS url for the given record Official Docs: https://www.cloudns.net/wiki/article/64/

func (*RecordService) GetSOA

func (svc *RecordService) GetSOA(ctx context.Context, zoneName string) (result SOA, err error)

GetSOA returns the SOA record of the given zone Official Docs: https://www.cloudns.net/wiki/article/62/

func (*RecordService) Import

func (svc *RecordService) Import(ctx context.Context, zoneName string, format RecordFormat, content string, overwrite bool) (result StatusResult, err error)

Import records with a specific format into the zone, optionally overwriting the existing records Official Docs: https://www.cloudns.net/wiki/article/156/

func (*RecordService) ImportTransfer

func (svc *RecordService) ImportTransfer(ctx context.Context, zoneName, server string) (result StatusResult, err error)

ImportTransfer imports records from an authoritative nameserver into the zone using AXFR, overwriting all records Official Docs: https://www.cloudns.net/wiki/article/65/

func (*RecordService) List

func (svc *RecordService) List(ctx context.Context, zoneName string) (result RecordMap, err error)

List returns all the records of a given zone Official Docs: https://www.cloudns.net/wiki/article/57/

func (*RecordService) Search

func (svc *RecordService) Search(ctx context.Context, zoneName, host string, recordType RecordType) (result RecordMap, err error)

Search returns all records matching a given host and/or record type within the given zone Official Docs: https://www.cloudns.net/wiki/article/57/

func (*RecordService) SetActive

func (svc *RecordService) SetActive(ctx context.Context, zoneName string, recordID int, isActive bool) (result StatusResult, err error)

SetActive enables or disables a given record ID within the specified zone Official Docs: https://www.cloudns.net/wiki/article/66/

func (*RecordService) Update

func (svc *RecordService) Update(ctx context.Context, zoneName string, recordID int, record Record) (result StatusResult, err error)

Update modifies a specific record with a given record ID inside the given zone Official Docs: https://www.cloudns.net/wiki/article/60/

func (*RecordService) UpdateSOA

func (svc *RecordService) UpdateSOA(ctx context.Context, zoneName string, soa SOA) (result StatusResult, err error)

UpdateSOA updates the SOA record of the given zone Official Docs: https://www.cloudns.net/wiki/article/63/

type RecordType

type RecordType string

RecordType is an enumeration of all known record types. It is based on a string, as this allows usage of new or unknown record types and avoids any internal mappings in cloudns-go.

const (
	RecordTypeUnknown     RecordType = ""
	RecordTypeA           RecordType = "A"
	RecordTypeAAAA        RecordType = "AAAA"
	RecordTypeALIAS       RecordType = "ALIAS"
	RecordTypeCAA         RecordType = "CAA"
	RecordTypeCNAME       RecordType = "CNAME"
	RecordTypeMX          RecordType = "MX"
	RecordTypeNAPTR       RecordType = "NAPTR"
	RecordTypeNS          RecordType = "NS"
	RecordTypePTR         RecordType = "PTR"
	RecordTypeRP          RecordType = "RP"
	RecordTypeSRV         RecordType = "SRV"
	RecordTypeSSHFP       RecordType = "SSHFP"
	RecordTypeTLSA        RecordType = "TLSA"
	RecordTypeTXT         RecordType = "TXT"
	RecordTypeWebRedirect RecordType = "WR"
)

Enumeration values for RecordType

type RecordsExport

type RecordsExport struct {
	StatusResult
	Zone string `json:"zone"`
}

RecordsExport represents a BIND zone file export provided by the ClouDNS API

type SOA

type SOA struct {
	Serial     int    `json:"serialNumber,string"`
	PrimaryNS  string `json:"primaryNS"`
	AdminMail  string `json:"adminMail"`
	Refresh    int    `json:"refresh,string"`
	Retry      int    `json:"retry,string"`
	Expire     int    `json:"expire,string"`
	DefaultTTL int    `json:"defaultTTL,string"`
}

SOA represents the SOA record of a ClouDNS zone

func (SOA) AsParams

func (soa SOA) AsParams() HTTPParams

AsParams returns the HTTP parameters for the SOA record for use within the other API methods

type SRV

type SRV struct {
	Weight uint16 `json:"weight,string,omitempty"`
	Port   uint16 `json:"port,string,omitempty"`
}

SRV represents parameters specifically for SRV records

type SSHFP

type SSHFP struct {
	Algorithm uint8 `json:"algorithm,string,omitempty"`
	Type      uint8 `json:"fp_type,string,omitempty"`
}

SSHFP represents parameters specifically for SSHFP records

type StatusResult

type StatusResult struct {
	Status            string `json:"status"`
	StatusDescription string `json:"statusDescription"`
	StatusMessage     string `json:"statusMessage"`
}

StatusResult is a common result used by all ClouDNS API methods for either

type TLSA

type TLSA struct {
	Usage        uint8 `json:"tlsa_usage,string,omitempty"`
	Selector     uint8 `json:"tlsa_selector,string,omitempty"`
	MatchingType uint8 `json:"tlsa_matching_type,string,omitempty"`
}

TLSA represents parameters specifically for TLSA records

type WebRedirect

type WebRedirect struct {
	MobileMeta   APIBool `json:"mobile_meta"`
	SavePath     APIBool `json:"save_path,omitempty"`
	RedirectType int     `json:"redirect_type,string,omitempty"`

	IsFrame          APIBool `json:"frame,omitempty"`
	FrameTitle       string  `json:"frame_title,omitempty"`
	FrameKeywords    string  `json:"frame_keywords,omitempty"`
	FrameDescription string  `json:"frame_description,omitempty"`
}

WebRedirect represents parameters specifically for web redirect records

type Zone

type Zone struct {
	Name     string   `json:"name"`
	Type     ZoneType `json:"type"`
	Kind     ZoneKind `json:"zone"`
	IsActive APIBool  `json:"status"`
}

Zone represents a ClouDNS record according to the official API docs

type ZoneKind

type ZoneKind int

ZoneKind is an enumeration of all supported zone kinds

const (
	ZoneKindUnknown ZoneKind = iota
	ZoneKindDomain
	ZoneKindIPv4
	ZoneKindIPv6
)

Enumeration values for ZoneKind

func (*ZoneKind) UnmarshalJSON

func (zk *ZoneKind) UnmarshalJSON(data []byte) error

UnmarshalJSON converts the ClouDNS zone type into the correct ZoneType enumeration value

type ZoneService

type ZoneService struct {
	// contains filtered or unexported fields
}

ZoneService is a service object which groups all operations related to ClouDNS zone management

func (*ZoneService) AvailableNameservers

func (svc *ZoneService) AvailableNameservers(ctx context.Context) (result []Nameserver, err error)

AvailableNameservers returns all nameservers available for the current account Official Docs: https://www.cloudns.net/wiki/article/47/

func (*ZoneService) Get

func (svc *ZoneService) Get(ctx context.Context, zoneName string) (result Zone, err error)

Get returns a zone with a given name Official Docs: https://www.cloudns.net/wiki/article/134/

func (*ZoneService) GetUpdateStatus

func (svc *ZoneService) GetUpdateStatus(ctx context.Context, zoneName string) (result []ZoneUpdateStatus, err error)

GetUpdateStatus returns a list of all nameservers for the given zone with their update status Official Docs: https://www.cloudns.net/wiki/article/53/

func (*ZoneService) GetUsage

func (svc *ZoneService) GetUsage(ctx context.Context) (result ZoneUsage, err error)

GetUsage returns the current zone usage for the current account (actual usage and maximum zones for current plan) Official Docs: https://www.cloudns.net/wiki/article/52/

func (*ZoneService) IsUpdated

func (svc *ZoneService) IsUpdated(ctx context.Context, zoneName string) (result bool, err error)

IsUpdated returns a boolean if the given zone has been updated to all ClouDNS nameservers Official Docs: https://www.cloudns.net/wiki/article/54/

func (*ZoneService) List

func (svc *ZoneService) List(ctx context.Context) ([]Zone, error)

List returns all zones Official Docs: https://www.cloudns.net/wiki/article/50/

func (*ZoneService) Search

func (svc *ZoneService) Search(ctx context.Context, search string, groupID int) ([]Zone, error)

Search returns all zones matching a given name and/or group ID Official Docs: https://www.cloudns.net/wiki/article/50/

func (*ZoneService) SetActive

func (svc *ZoneService) SetActive(ctx context.Context, zoneName string, isActive bool) (result StatusResult, err error)

SetActive enables or disables a zone with the given name Official Docs: https://www.cloudns.net/wiki/article/55/

func (*ZoneService) TriggerUpdate

func (svc *ZoneService) TriggerUpdate(ctx context.Context, zoneName string) (result StatusResult, err error)

TriggerUpdate triggers a manual update for a given zone Official Docs: https://www.cloudns.net/wiki/article/135/

type ZoneType

type ZoneType int

ZoneType is an enumeration of all supported zone types

const (
	ZoneTypeUnknown ZoneType = iota
	ZoneTypeMaster
	ZoneTypeSlave
	ZoneTypeParked
	ZoneTypeGeoDNS
)

Enumeration values for ZoneType

func (*ZoneType) UnmarshalJSON

func (zt *ZoneType) UnmarshalJSON(data []byte) error

UnmarshalJSON converts the ClouDNS zone type into the correct ZoneType enumeration value

type ZoneUpdateStatus

type ZoneUpdateStatus struct {
	Server    string  `json:"server"`
	IPv4      string  `json:"ip4"`
	IPv6      string  `json:"ip6"`
	IsUpdated APIBool `json:"updated"`
}

ZoneUpdateStatus represents the current update status of a nameserver for a given zone

type ZoneUsage

type ZoneUsage struct {
	Current int `json:"count,string"`
	Limit   int `json:"limit,string"`
}

ZoneUsage represents the current zone usage for a ClouDNS account

Jump to

Keyboard shortcuts

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